mirror of
https://github.com/encounter/cwdemangle.git
synced 2025-10-16 06:15:09 +00:00
Fix license allow list and clippy warning
This commit is contained in:
parent
190783808a
commit
0a27bee814
@ -21,7 +21,7 @@ struct Args {
|
|||||||
|
|
||||||
fn main() -> Result<(), &'static str> {
|
fn main() -> Result<(), &'static str> {
|
||||||
let args: Args = from_env();
|
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,
|
omit_empty_parameters: !args.keep_void,
|
||||||
mw_extensions: args.mw_extensions,
|
mw_extensions: args.mw_extensions,
|
||||||
}) {
|
}) {
|
||||||
@ -29,5 +29,5 @@ fn main() -> Result<(), &'static str> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
Err("Failed to demangle symbol")
|
Err("Failed to demangle symbol")
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ allow = [
|
|||||||
"MIT",
|
"MIT",
|
||||||
"Apache-2.0",
|
"Apache-2.0",
|
||||||
"BSD-3-Clause",
|
"BSD-3-Clause",
|
||||||
"Unicode-DFS-2016",
|
"Unicode-3.0",
|
||||||
]
|
]
|
||||||
# The confidence threshold for detecting a license from license text.
|
# The confidence threshold for detecting a license from license text.
|
||||||
# The higher the value, the more closely the license text must be to the
|
# The higher the value, the more closely the license text must be to the
|
||||||
|
@ -426,8 +426,8 @@ pub fn demangle(mut str: &str, options: &DemangleOptions) -> Option<String> {
|
|||||||
}
|
}
|
||||||
let rest = &rest[1..];
|
let rest = &rest[1..];
|
||||||
if let Some((_, rest2)) = parse_digits(rest) {
|
if let Some((_, rest2)) = parse_digits(rest) {
|
||||||
if rest2.starts_with('@') {
|
if let Some(stripped) = rest2.strip_prefix('@') {
|
||||||
let fn_demangled = demangle(&rest2[1..], options)?;
|
let fn_demangled = demangle(stripped, options)?;
|
||||||
thunk_res = Some(format!("virtual thunk to {fn_demangled}"));
|
thunk_res = Some(format!("virtual thunk to {fn_demangled}"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user