Fix license allow list and clippy warning

This commit is contained in:
Luke Street 2025-09-13 12:46:00 -06:00
parent 190783808a
commit 0a27bee814
3 changed files with 5 additions and 5 deletions

View File

@ -21,7 +21,7 @@ struct Args {
fn main() -> Result<(), &'static str> {
let args: Args = from_env();
return if let Some(symbol) = demangle(args.symbol.as_str(), &DemangleOptions {
if let Some(symbol) = demangle(args.symbol.as_str(), &DemangleOptions {
omit_empty_parameters: !args.keep_void,
mw_extensions: args.mw_extensions,
}) {
@ -29,5 +29,5 @@ fn main() -> Result<(), &'static str> {
Ok(())
} else {
Err("Failed to demangle symbol")
};
}
}

View File

@ -92,7 +92,7 @@ allow = [
"MIT",
"Apache-2.0",
"BSD-3-Clause",
"Unicode-DFS-2016",
"Unicode-3.0",
]
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the

View File

@ -426,8 +426,8 @@ pub fn demangle(mut str: &str, options: &DemangleOptions) -> Option<String> {
}
let rest = &rest[1..];
if let Some((_, rest2)) = parse_digits(rest) {
if rest2.starts_with('@') {
let fn_demangled = demangle(&rest2[1..], options)?;
if let Some(stripped) = rest2.strip_prefix('@') {
let fn_demangled = demangle(stripped, options)?;
thunk_res = Some(format!("virtual thunk to {fn_demangled}"));
}
}