mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +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…
Add table
Add a link
Reference in a new issue