Skip to content

Commit

Permalink
[refactor]: lints
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Balashov <[email protected]>
  • Loading branch information
0x009922 committed Dec 5, 2023
1 parent a86ab67 commit 174ee74
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions config/src/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<RegularTelemetryConfig>, Option<DevTelemetryConfig>) {
let Self {
ref name,
Expand All @@ -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)
}
Expand Down

0 comments on commit 174ee74

Please sign in to comment.