uucore: num_parser: Copy PartialMatch String in ExtendedParserError

In one case, we'll need an actual owned String in PartialMatch,
so it's easier to just use that. Removes a bunch of lifetime things
in the code too.
This commit is contained in:
Nicolas Boichat
2025-07-16 00:28:34 +02:00
committed by Dorian Péron
parent 5b6a617024
commit 9ddb8092e7
2 changed files with 201 additions and 140 deletions
@@ -172,7 +172,7 @@ impl<'a> FormatArguments<'a> {
}
}
fn extract_value<T: Default>(p: Result<T, ExtendedParserError<'_, T>>, input: &str) -> T {
fn extract_value<T: Default>(p: Result<T, ExtendedParserError<T>>, input: &str) -> T {
match p {
Ok(v) => v,
Err(e) => {
File diff suppressed because it is too large Load Diff