apply clippy::or_fun_call
This commit is contained in:
parent
55d436467c
commit
8c83935cdf
13 changed files with 32 additions and 28 deletions
|
|
@ -2368,7 +2368,8 @@ impl<'test> TestCx<'test> {
|
|||
// Real paths into the libstd/libcore
|
||||
let rust_src_dir = &self.config.sysroot_base.join("lib/rustlib/src/rust");
|
||||
rust_src_dir.try_exists().expect(&*format!("{} should exists", rust_src_dir));
|
||||
let rust_src_dir = rust_src_dir.read_link_utf8().unwrap_or(rust_src_dir.to_path_buf());
|
||||
let rust_src_dir =
|
||||
rust_src_dir.read_link_utf8().unwrap_or_else(|_| rust_src_dir.to_path_buf());
|
||||
normalize_path(&rust_src_dir.join("library"), "$SRC_DIR_REAL");
|
||||
|
||||
// eg.
|
||||
|
|
|
|||
|
|
@ -357,9 +357,9 @@ impl<'test> TestCx<'test> {
|
|||
// Add this line to the current subview.
|
||||
subviews
|
||||
.last_mut()
|
||||
.ok_or(format!(
|
||||
"unexpected subview line outside of a subview on line {line_num}"
|
||||
))?
|
||||
.ok_or_else(|| {
|
||||
format!("unexpected subview line outside of a subview on line {line_num}")
|
||||
})?
|
||||
.push(line);
|
||||
} else {
|
||||
// This line is not part of a subview, so sort and print any
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue