diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-09-18 19:15:10 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-09-18 19:50:46 +0300 |
commit | 71e7bf07fd9efd17da40e077babbf634113f8fed (patch) | |
tree | 2e08541bbede3e5dacdd7fe1bce2e1b0da55ae4e /src/chunkid.rs | |
parent | e4457fa26afb27b227674c5dd1284a26127dcea6 (diff) | |
download | obnam2-71e7bf07fd9efd17da40e077babbf634113f8fed.tar.gz |
use to_string method for ChunkId instead of format! macro
Diffstat (limited to 'src/chunkid.rs')
-rw-r--r-- | src/chunkid.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/chunkid.rs b/src/chunkid.rs index ba301a1..44a76d6 100644 --- a/src/chunkid.rs +++ b/src/chunkid.rs @@ -57,9 +57,9 @@ mod test { use super::ChunkId; #[test] - fn displayable() { + fn to_string() { let id = ChunkId::new(); - assert_ne!(format!("{}", id), "") + assert_ne!(id.to_string(), "") } #[test] @@ -73,13 +73,13 @@ mod test { fn recreatable() { let id_str = "xyzzy"; // it doesn't matter what the string representation is let id: ChunkId = id_str.parse().unwrap(); - assert_eq!(format!("{}", id), id_str); + assert_eq!(id.to_string(), id_str); } #[test] fn survives_round_trip() { let id = ChunkId::new(); - let id_str = format!("{}", id); + let id_str = id.to_string(); assert_eq!(id, id_str.parse().unwrap()); } } |