Skip to content

Commit

Permalink
clippy improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
robertohuertasm committed Nov 5, 2024
1 parent 1f53c87 commit ffce2c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/bins/src/bin/datadog_static_analyzer_server/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pub fn prepare_rocket(tx_keep_alive_error: Sender<i32>) -> Result<RocketPreparat
// tracing with logs
let log_dir = matches
.opt_str("d")
.map_or_else(get_default_log_dir, |d| d.into());
.map_or_else(get_default_log_dir, std::convert::Into::into);
let file_appender = try_to_file_appender(
log_rolling,
log_dir,
Expand Down
5 changes: 1 addition & 4 deletions crates/bins/src/bin/datadog_static_analyzer_server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ pub async fn start() {
// launch the rocket and check if we receive a keep-alive error
let result = rocket::tokio::select! {
a = endpoints::launch_rocket_with_endpoints(*rocket, tx_rocket_shutdown) => a,
b = rx_keep_alive_error.recv() => match b {
Some(c) => Err(c.into()),
_ => Err(EndpointError::ExitCode(ERROR_CHANNEL_SENDER_DROPPED))
},
b = rx_keep_alive_error.recv() => b.map_or_else(|| Err(EndpointError::ExitCode(ERROR_CHANNEL_SENDER_DROPPED)), |c| Err(c.into())),
};

if let Err(e) = result {
Expand Down

0 comments on commit ffce2c9

Please sign in to comment.