Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin: replaces map_err for inspect_err in cases where we were only logging and returning #265

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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