diff --git a/config/src/telemetry.rs b/config/src/telemetry.rs index 92cfec7deb9..3b04f79c483 100644 --- a/config/src/telemetry.rs +++ b/config/src/telemetry.rs @@ -46,7 +46,7 @@ pub struct DevTelemetryConfig { impl Configuration { /// Parses user-provided configuration into stronger typed structures /// - /// Should be refactored with https://github.com/hyperledger/iroha/issues/3500 + /// Should be refactored with [#3500](https://github.com/hyperledger/iroha/issues/3500) pub fn parse(&self) -> (Option, Option) { let Self { ref name, @@ -67,11 +67,9 @@ impl Configuration { None }; - let dev = if let Some(file) = file { - Some(DevTelemetryConfig { file: file.clone() }) - } else { - None - }; + let dev = file + .as_ref() + .map(|file| DevTelemetryConfig { file: file.clone() }); (regular, dev) }