diff options
| author | Philipp Krones <hello@philkrones.com> | 2022-10-06 09:44:38 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2022-10-06 09:44:38 +0200 |
| commit | d75b25faabdcf0a22fe37928917c4ab1761fa265 (patch) | |
| tree | e8c46d2dae51a0a61a6d28de138ca9add8276d8d /rustc_tools_util/src | |
| parent | da16cc1da9814710e637ff242b71768a4d3724b7 (diff) | |
| download | rust-d75b25faabdcf0a22fe37928917c4ab1761fa265.tar.gz rust-d75b25faabdcf0a22fe37928917c4ab1761fa265.zip | |
Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup
Diffstat (limited to 'rustc_tools_util/src')
| -rw-r--r-- | rustc_tools_util/src/lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rustc_tools_util/src/lib.rs b/rustc_tools_util/src/lib.rs index 429dddc42ea..01d25c53126 100644 --- a/rustc_tools_util/src/lib.rs +++ b/rustc_tools_util/src/lib.rs @@ -48,8 +48,8 @@ impl std::fmt::Display for VersionInfo { if (hash_trimmed.len() + date_trimmed.len()) > 0 { write!( f, - "{} {}.{}.{} ({} {})", - self.crate_name, self.major, self.minor, self.patch, hash_trimmed, date_trimmed, + "{} {}.{}.{} ({hash_trimmed} {date_trimmed})", + self.crate_name, self.major, self.minor, self.patch, )?; } else { write!(f, "{} {}.{}.{}", self.crate_name, self.major, self.minor, self.patch)?; @@ -137,7 +137,7 @@ mod test { let vi = get_version_info!(); assert_eq!(vi.major, 0); assert_eq!(vi.minor, 2); - assert_eq!(vi.patch, 0); + assert_eq!(vi.patch, 1); assert_eq!(vi.crate_name, "rustc_tools_util"); // hard to make positive tests for these since they will always change assert!(vi.commit_hash.is_none()); @@ -147,16 +147,16 @@ mod test { #[test] fn test_display_local() { let vi = get_version_info!(); - assert_eq!(vi.to_string(), "rustc_tools_util 0.2.0"); + assert_eq!(vi.to_string(), "rustc_tools_util 0.2.1"); } #[test] fn test_debug_local() { let vi = get_version_info!(); - let s = format!("{:?}", vi); + let s = format!("{vi:?}"); assert_eq!( s, - "VersionInfo { crate_name: \"rustc_tools_util\", major: 0, minor: 2, patch: 0 }" + "VersionInfo { crate_name: \"rustc_tools_util\", major: 0, minor: 2, patch: 1 }" ); } } |
