mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
id: remove unnecessary to_string calls
This commit is contained in:
parent
f4b16176a0
commit
f4b1a97c0a
1 changed files with 2 additions and 8 deletions
|
@ -174,13 +174,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||
));
|
||||
}
|
||||
|
||||
let delimiter = {
|
||||
if state.zflag {
|
||||
"\0".to_string()
|
||||
} else {
|
||||
" ".to_string()
|
||||
}
|
||||
};
|
||||
let delimiter = if state.zflag { "\0" } else { " " };
|
||||
let line_ending = LineEnding::from_zero_flag(state.zflag);
|
||||
|
||||
if state.cflag {
|
||||
|
@ -307,7 +301,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||
}
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join(&delimiter),
|
||||
.join(delimiter),
|
||||
// NOTE: this is necessary to pass GNU's "tests/id/zero.sh":
|
||||
if state.zflag && state.user_specified && users.len() > 1 {
|
||||
"\0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue