Skip to content

Commit 87b2a01

Browse files
committed
fix: remove unneeded 'to_string()' calls
1 parent 0371804 commit 87b2a01

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

internal/mithril-persistence/src/database/version_checker.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,11 @@ insert into db_version (application_type, version, updated_at) values ('{applica
200200
mithril-{} database migrate --stores-directory /path/to/stores-directory
201201
"#,
202202
migration_version,
203-
self.application_type.to_string(),
203+
self.application_type,
204204
fallback_distribution_version,
205-
self.application_type.to_string(),
205+
self.application_type,
206206
fallback_distribution_version,
207-
self.application_type.to_string()
207+
self.application_type
208208
)
209209
}
210210
}

mithril-common/src/crypto_helper/codec/binary.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,8 @@ pub trait TryFromBytes: Sized {
2020

2121
/// Try to convert from hex string encoded bytes.
2222
fn try_from_bytes_hex(hex_string: &str) -> StdResult<Self> {
23-
let bytes = Vec::from_hex(hex_string).map_err(|e| {
24-
anyhow::anyhow!(
25-
"Could not deserialize binary from hex string: {}",
26-
e.to_string()
27-
)
28-
})?;
23+
let bytes = Vec::from_hex(hex_string)
24+
.map_err(|e| anyhow::anyhow!("Could not deserialize binary from hex string: {}", e))?;
2925

3026
Self::try_from_bytes(&bytes)
3127
}

0 commit comments

Comments
 (0)