mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Merge pull request #5246 from cakebaker/yes_use_let_else
yes: use let/else to fix todo
This commit is contained in:
commit
8b24e7ce0b
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