-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Log & continue on mapper errors (#53)
- Loading branch information
Showing
4 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
use crate::framework::Error; | ||
|
||
pub mod throttle; | ||
|
||
pub(crate) trait SwallowResult { | ||
fn ok_or_warn(self, context: &'static str); | ||
} | ||
|
||
impl SwallowResult for Result<(), Error> { | ||
fn ok_or_warn(self, context: &'static str) { | ||
match self { | ||
Ok(_) => (), | ||
Err(e) => log::warn!("{}: {:?}", context, e), | ||
} | ||
} | ||
} |