Skip to content

Commit 0a27bee

Browse files
committed
Fix license allow list and clippy warning
1 parent 1907838 commit 0a27bee

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

bin/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ struct Args {
2121

2222
fn main() -> Result<(), &'static str> {
2323
let args: Args = from_env();
24-
return if let Some(symbol) = demangle(args.symbol.as_str(), &DemangleOptions {
24+
if let Some(symbol) = demangle(args.symbol.as_str(), &DemangleOptions {
2525
omit_empty_parameters: !args.keep_void,
2626
mw_extensions: args.mw_extensions,
2727
}) {
2828
println!("{symbol}");
2929
Ok(())
3030
} else {
3131
Err("Failed to demangle symbol")
32-
};
32+
}
3333
}

deny.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ allow = [
9292
"MIT",
9393
"Apache-2.0",
9494
"BSD-3-Clause",
95-
"Unicode-DFS-2016",
95+
"Unicode-3.0",
9696
]
9797
# The confidence threshold for detecting a license from license text.
9898
# The higher the value, the more closely the license text must be to the

lib/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@ pub fn demangle(mut str: &str, options: &DemangleOptions) -> Option<String> {
426426
}
427427
let rest = &rest[1..];
428428
if let Some((_, rest2)) = parse_digits(rest) {
429-
if rest2.starts_with('@') {
430-
let fn_demangled = demangle(&rest2[1..], options)?;
429+
if let Some(stripped) = rest2.strip_prefix('@') {
430+
let fn_demangled = demangle(stripped, options)?;
431431
thunk_res = Some(format!("virtual thunk to {fn_demangled}"));
432432
}
433433
}

0 commit comments

Comments
 (0)