Replace as_ref().map(Deref::deref) with as_deref()
Replace Option::as_ref().map(Deref::deref) with Option::as_deref(), as
this is a simplification available since Rust 1.40. Clippy warns of this
issue as of Rust 1.42.
@@ -127,7 +127,7 @@ fn run_sawtooth(config: GridConfig, connection_pool: ConnectionPool) -> Result<(
let evt_processor = EventProcessor::start(
sawtooth_connection,
- current_commit.as_ref().map(String::as_str),
+ current_commit.as_deref(),
event_handlers![DatabaseEventHandler::new(connection_pool)],
)
.map_err(|err| DaemonError::EventProcessorError(Box::new(err)))?;
