diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/expect/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/expect/src/lib.rs b/crates/expect/src/lib.rs index 18f361ec2..aa95a88c5 100644 --- a/crates/expect/src/lib.rs +++ b/crates/expect/src/lib.rs | |||
@@ -4,10 +4,12 @@ use std::{ | |||
4 | collections::HashMap, | 4 | collections::HashMap, |
5 | env, fmt, fs, | 5 | env, fmt, fs, |
6 | ops::Range, | 6 | ops::Range, |
7 | panic, | ||
7 | path::{Path, PathBuf}, | 8 | path::{Path, PathBuf}, |
8 | sync::Mutex, | 9 | sync::Mutex, |
9 | }; | 10 | }; |
10 | 11 | ||
12 | use difference::Changeset; | ||
11 | use once_cell::sync::Lazy; | 13 | use once_cell::sync::Lazy; |
12 | use stdx::{lines_with_ends, trim_indent}; | 14 | use stdx::{lines_with_ends, trim_indent}; |
13 | 15 | ||
@@ -108,7 +110,7 @@ impl Runtime { | |||
108 | 110 | ||
109 | let help = if print_help { HELP } else { "" }; | 111 | let help = if print_help { HELP } else { "" }; |
110 | 112 | ||
111 | let diff = difference::Changeset::new(actual, expected, "\n"); | 113 | let diff = Changeset::new(actual, expected, "\n"); |
112 | 114 | ||
113 | println!( | 115 | println!( |
114 | "\n | 116 | "\n |
@@ -133,7 +135,7 @@ impl Runtime { | |||
133 | updated, expect.file, expect.line, expect.column, help, expected, actual, diff | 135 | updated, expect.file, expect.line, expect.column, help, expected, actual, diff |
134 | ); | 136 | ); |
135 | // Use resume_unwind instead of panic!() to prevent a backtrace, which is unnecessary noise. | 137 | // Use resume_unwind instead of panic!() to prevent a backtrace, which is unnecessary noise. |
136 | std::panic::resume_unwind(Box::new(())); | 138 | panic::resume_unwind(Box::new(())); |
137 | } | 139 | } |
138 | } | 140 | } |
139 | 141 | ||