Skip to content

Commit

Permalink
Merge pull request #265 from sr-gi/clippy-inspect-error
Browse files Browse the repository at this point in the history
plugin: replaces map_err for inspect_err in cases where we were only logging and returning
  • Loading branch information
sr-gi authored Sep 5, 2024
2 parents 9248f3a + cc0d183 commit 4e47db2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions watchtower-plugin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,9 +636,8 @@ async fn main() -> Result<(), Error> {
.as_i64()
.unwrap(),
)
.map_err(|e| {
.inspect_err(|_| {
log::error!("{} out of range", constants::WT_MAX_RETRY_TIME);
e
})?;

let auto_retry_delay = u32::try_from(
Expand All @@ -648,9 +647,8 @@ async fn main() -> Result<(), Error> {
.as_i64()
.unwrap(),
)
.map_err(|e| {
.inspect_err(|_| {
log::error!("{} out of range", constants::WT_AUTO_RETRY_DELAY);
e
})?;

let max_interval_time = u16::try_from(
Expand All @@ -660,9 +658,8 @@ async fn main() -> Result<(), Error> {
.as_i64()
.unwrap(),
)
.map_err(|e| {
.inspect_err(|_| {
log::error!("{} out of range", constants::DEV_WT_MAX_RETRY_INTERVAL);
e
})?;

let plugin = midstate.start(wt_client.clone()).await?;
Expand Down

0 comments on commit 4e47db2

Please sign in to comment.