dsl_util: use .ok() to drop unprintable error

I used .map_err(|_: Vec<_>|) to clarify that the original data is returned as
an error (so it can't be .unwrap()-ed.) However, it can be said that the error
detail isn't important and .map_err() is too verbose.
This commit is contained in:
Yuya Nishihara 2024-05-29 08:12:30 +09:00
parent db16a5968b
commit da2ef7fe4e

View file

@ -97,7 +97,7 @@ impl<'i, T> FunctionCallNode<'i, T> {
optional.resize(M, None);
Ok((
required.try_into().unwrap(),
optional.try_into().map_err(|_: Vec<_>| ()).unwrap(),
optional.try_into().ok().unwrap(),
))
} else {
let (min, max) = count_range.into_inner();