Skip to content

Commit e0805fe

Browse files
committed
fix clippy: variables can be used directly in the format! string
1 parent 77590f1 commit e0805fe

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

tests/testsuite/file_ini.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ fn test_nothing() {
260260
.build();
261261
assert!(res.is_ok());
262262
let c = res.unwrap();
263-
let cc = format!("{:?}", c);
264-
assert_data_eq!(cc, str!("Config { defaults: {}, overrides: {}, sources: [], cache: Value { origin: None, kind: Table({}) } }"));
263+
assert_data_eq!(
264+
format!("{:?}", c),
265+
str!("Config { defaults: {}, overrides: {}, sources: [], cache: Value { origin: None, kind: Table({}) } }")
266+
);
265267
}

tests/testsuite/file_toml.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,8 @@ fn test_nothing() {
446446
.build();
447447
assert!(res.is_ok());
448448
let c = res.unwrap();
449-
let cc = format!("{:?}", c);
450-
assert_data_eq!(cc, str!("Config { defaults: {}, overrides: {}, sources: [], cache: Value { origin: None, kind: Table({}) } }"));
449+
assert_data_eq!(
450+
format!("{:?}", c),
451+
str!("Config { defaults: {}, overrides: {}, sources: [], cache: Value { origin: None, kind: Table({}) } }")
452+
);
451453
}

tests/testsuite/file_yaml.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,8 @@ fn test_nothing() {
414414
.build();
415415
assert!(res.is_ok());
416416
let c = res.unwrap();
417-
let cc = format!("{:?}", c);
418-
assert_data_eq!(cc, str!("Config { defaults: {}, overrides: {}, sources: [], cache: Value { origin: None, kind: Table({}) } }"));
417+
assert_data_eq!(
418+
format!("{:?}", c),
419+
str!("Config { defaults: {}, overrides: {}, sources: [], cache: Value { origin: None, kind: Table({}) } }")
420+
);
419421
}

0 commit comments

Comments
 (0)