aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-06-27 20:33:14 +0100
committerAleksey Kladov <[email protected]>2020-06-27 20:33:14 +0100
commit53787c7eba71d91811c6519a1186755787dcd204 (patch)
tree5dcdd2d04cc1ae4bc0b69e0b13eaf1b4ae2099a5
parenta9b4fb034bab194bef80c75f146288e55ae8aa2d (diff)
style
-rw-r--r--crates/expect/src/lib.rs6
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
12use difference::Changeset;
11use once_cell::sync::Lazy; 13use once_cell::sync::Lazy;
12use stdx::{lines_with_ends, trim_indent}; 14use 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