mirror of
git://git.proxmox.com/git/perlmod.git
synced 2025-03-13 04:58:16 +03:00
macro: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
83ac604e08
commit
a2a884c13d
@ -370,6 +370,7 @@ fn handle_return_kind(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::branches_sharing_code)] // ARE YOU SERIOUS?
|
||||||
if attr.raw_return {
|
if attr.raw_return {
|
||||||
let mut rt = TokenStream::new();
|
let mut rt = TokenStream::new();
|
||||||
for i in 0..count {
|
for i in 0..count {
|
||||||
|
@ -157,7 +157,7 @@ static mut LIB_NAME: Option<String> = None;
|
|||||||
pub fn get_default_lib_name(why: Span) -> Result<&'static str, syn::Error> {
|
pub fn get_default_lib_name(why: Span) -> Result<&'static str, syn::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
if let Some(name) = &LIB_NAME {
|
if let Some(name) = &LIB_NAME {
|
||||||
return Ok(&name);
|
return Ok(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,6 +186,6 @@ pub fn get_default_lib_name(why: Span) -> Result<&'static str, syn::Error> {
|
|||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
LIB_NAME = Some(name.replace('-', "_"));
|
LIB_NAME = Some(name.replace('-', "_"));
|
||||||
return Ok(&LIB_NAME.as_ref().unwrap());
|
return Ok(LIB_NAME.as_ref().unwrap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user