Skip to content

Commit a77e251

Browse files
committed
style: reformat util_name assignment in CmdResult::gnu_result for readability
Refactor the chained method calls to break across multiple lines, improving code formatting and adherence to Rust style guidelines without altering functionality.
1 parent 4198707 commit a77e251

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/uutests/src/lib/util.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -761,9 +761,10 @@ impl CmdResult {
761761

762762
#[cfg(unix)]
763763
fn gnu_result(&self) -> std::result::Result<CmdResult, String> {
764-
let util_name = self.util_name.as_ref().ok_or_else(|| {
765-
format!("{UUTILS_WARNING}: matches_gnu requires a utility name")
766-
})?;
764+
let util_name = self
765+
.util_name
766+
.as_ref()
767+
.ok_or_else(|| format!("{UUTILS_WARNING}: matches_gnu requires a utility name"))?;
767768
println!("{}", check_coreutil_version(util_name, VERSION_MIN)?);
768769
let gnu_name = host_name_for(util_name);
769770

0 commit comments

Comments
 (0)