mirror of
https://github.com/uutils/coreutils
synced 2024-12-12 14:22:41 +00:00
clippy: simplify code according to nightly 'manual_unwrap_or_default' lint
https://rust-lang.github.io/rust-clippy/master/index.html#/manual_unwrap_or_default
This commit is contained in:
parent
42b3baf32f
commit
c8d10ea69e
1 changed files with 1 additions and 4 deletions
|
@ -54,10 +54,7 @@ fn test_long_format_multiple_users() {
|
|||
// multiple instances of one account we know exists,
|
||||
// the account of the test runner,
|
||||
// and an account that (probably) doesn't exist
|
||||
let runner = match std::env::var("USER") {
|
||||
Ok(user) => user,
|
||||
Err(_) => String::new(),
|
||||
};
|
||||
let runner = std::env::var("USER").unwrap_or_default();
|
||||
let args = ["-l", "root", "root", "root", &runner, "no_such_user"];
|
||||
let ts = TestScenario::new(util_name!());
|
||||
let expect = unwrap_or_return!(expected_result(&ts, &args));
|
||||
|
|
Loading…
Reference in a new issue