Skip to content

Commit be8ca56

Browse files
author
binlingyu
committed
used assert macro with a literal bool
1 parent 94b922d commit be8ca56

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Diff for: src/config.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ mod tests {
13311331
smart-punctuation = true
13321332
"#;
13331333
let config = Config::from_str(src).unwrap();
1334-
assert_eq!(config.html_config().unwrap().smart_punctuation(), true);
1334+
assert!(config.html_config().unwrap().smart_punctuation());
13351335

13361336
let src = r#"
13371337
[book]
@@ -1341,16 +1341,13 @@ mod tests {
13411341
curly-quotes = true
13421342
"#;
13431343
let config = Config::from_str(src).unwrap();
1344-
assert_eq!(config.html_config().unwrap().smart_punctuation(), true);
1344+
assert!(config.html_config().unwrap().smart_punctuation());
13451345

13461346
let src = r#"
13471347
[book]
13481348
title = "mdBook Documentation"
13491349
"#;
13501350
let config = Config::from_str(src).unwrap();
1351-
assert_eq!(
1352-
config.html_config().unwrap_or_default().smart_punctuation(),
1353-
false
1354-
);
1351+
assert!(!config.html_config().unwrap_or_default().smart_punctuation());
13551352
}
13561353
}

Diff for: tests/custom_preprocessors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn example_supports_whatever() {
1717

1818
let got = cmd.supports_renderer("whatever");
1919

20-
assert_eq!(got, true);
20+
assert!(got);
2121
}
2222

2323
#[test]
@@ -26,7 +26,7 @@ fn example_doesnt_support_not_supported() {
2626

2727
let got = cmd.supports_renderer("not-supported");
2828

29-
assert_eq!(got, false);
29+
assert!(!got);
3030
}
3131

3232
#[test]

0 commit comments

Comments
 (0)