Skip to content

Commit

Permalink
plugin: replaces map_err for inspect_err in cases where we were only …
Browse files Browse the repository at this point in the history
…logging and returning
  • Loading branch information
sr-gi committed Sep 5, 2024
1 parent 9248f3a commit cc0d183
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 cc0d183

Please sign in to comment.