1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

remove 'let and return'

This commit is contained in:
Daniel Eades 2022-01-30 14:04:13 +01:00
parent 784f2e2ea1
commit cf24620d3d

View file

@ -28,10 +28,9 @@ fn parse_octal(input: &str) -> IResult<&str, char> {
}
pub fn reduce_octal_to_char(input: &str) -> String {
let result = many0(alt((parse_octal, anychar)))(input)
many0(alt((parse_octal, anychar)))(input)
.map(|(_, r)| r)
.unwrap()
.into_iter()
.collect();
result
.collect()
}