mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
style
This commit is contained in:
parent
a9b4fb034b
commit
53787c7eba
1 changed files with 4 additions and 2 deletions
|
@ -4,10 +4,12 @@ use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
env, fmt, fs,
|
env, fmt, fs,
|
||||||
ops::Range,
|
ops::Range,
|
||||||
|
panic,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
sync::Mutex,
|
sync::Mutex,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use difference::Changeset;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use stdx::{lines_with_ends, trim_indent};
|
use stdx::{lines_with_ends, trim_indent};
|
||||||
|
|
||||||
|
@ -108,7 +110,7 @@ impl Runtime {
|
||||||
|
|
||||||
let help = if print_help { HELP } else { "" };
|
let help = if print_help { HELP } else { "" };
|
||||||
|
|
||||||
let diff = difference::Changeset::new(actual, expected, "\n");
|
let diff = Changeset::new(actual, expected, "\n");
|
||||||
|
|
||||||
println!(
|
println!(
|
||||||
"\n
|
"\n
|
||||||
|
@ -133,7 +135,7 @@ impl Runtime {
|
||||||
updated, expect.file, expect.line, expect.column, help, expected, actual, diff
|
updated, expect.file, expect.line, expect.column, help, expected, actual, diff
|
||||||
);
|
);
|
||||||
// Use resume_unwind instead of panic!() to prevent a backtrace, which is unnecessary noise.
|
// Use resume_unwind instead of panic!() to prevent a backtrace, which is unnecessary noise.
|
||||||
std::panic::resume_unwind(Box::new(()));
|
panic::resume_unwind(Box::new(()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue