diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-13 11:55:04 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-13 11:55:04 +0000 |
commit | 02b44006b8e37a8cd3f96d5b1c949d62e01be2e8 (patch) | |
tree | 69121d32a0a4e6484945fe1afa7724ea11ed223a /crates/test_utils | |
parent | b0ed808266e346b0f9330822f874e930710df4ec (diff) | |
parent | 680182d0a0853a3a76fd1cae9838feb5b0acf31c (diff) |
Merge #3575
3575: Restore cargo-fmt gating r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/test_utils')
-rw-r--r-- | crates/test_utils/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs index a0d8f4d37..db03df1c4 100644 --- a/crates/test_utils/src/lib.rs +++ b/crates/test_utils/src/lib.rs | |||
@@ -397,6 +397,8 @@ pub fn skip_slow_tests() -> bool { | |||
397 | should_skip | 397 | should_skip |
398 | } | 398 | } |
399 | 399 | ||
400 | const REWRITE: bool = false; | ||
401 | |||
400 | /// Asserts that `expected` and `actual` strings are equal. If they differ only | 402 | /// Asserts that `expected` and `actual` strings are equal. If they differ only |
401 | /// in trailing or leading whitespace the test won't fail and | 403 | /// in trailing or leading whitespace the test won't fail and |
402 | /// the contents of `actual` will be written to the file located at `path`. | 404 | /// the contents of `actual` will be written to the file located at `path`. |
@@ -412,7 +414,6 @@ fn assert_equal_text(expected: &str, actual: &str, path: &Path) { | |||
412 | fs::write(path, actual).unwrap(); | 414 | fs::write(path, actual).unwrap(); |
413 | return; | 415 | return; |
414 | } | 416 | } |
415 | const REWRITE: bool = false; | ||
416 | if REWRITE { | 417 | if REWRITE { |
417 | println!("rewriting {}", pretty_path.display()); | 418 | println!("rewriting {}", pretty_path.display()); |
418 | fs::write(path, actual).unwrap(); | 419 | fs::write(path, actual).unwrap(); |