mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 15:22:38 +00:00
yes: use let/else to fix todo
This commit is contained in:
parent
8a2bf34508
commit
e493b9c527
1 changed files with 1 additions and 4 deletions
|
@ -58,10 +58,7 @@ fn args_into_buffer<'a>(
|
|||
buf: &mut Vec<u8>,
|
||||
i: Option<impl Iterator<Item = &'a OsString>>,
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
// TODO: this should be replaced with let/else once available in the MSRV.
|
||||
let i = if let Some(i) = i {
|
||||
i
|
||||
} else {
|
||||
let Some(i) = i else {
|
||||
buf.extend_from_slice(b"y\n");
|
||||
return Ok(());
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue