mirror of
git://git.proxmox.com/git/perlmod.git
synced 2025-03-13 04:58:16 +03:00
clippy lints
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
f483228623
commit
81e9f75763
@ -231,8 +231,8 @@ pub fn handle_function(
|
||||
};
|
||||
|
||||
Ok(XSub {
|
||||
rust_name: name.to_owned(),
|
||||
perl_name: attr.perl_name.clone(),
|
||||
rust_name: name,
|
||||
perl_name: attr.perl_name,
|
||||
xs_name,
|
||||
tokens,
|
||||
})
|
||||
|
@ -21,7 +21,7 @@ pub fn handle_module(attr: AttributeArgs, mut module: syn::ItemMod) -> Result<To
|
||||
match core::mem::replace(item, syn::Item::Verbatim(TokenStream::new())) {
|
||||
syn::Item::Fn(mut func) => {
|
||||
let mut attribs = None;
|
||||
for attr in std::mem::replace(&mut func.attrs, Default::default()) {
|
||||
for attr in std::mem::take(&mut func.attrs) {
|
||||
if attr.path.is_ident("export") {
|
||||
if attribs.is_some() {
|
||||
bail!(attr => "multiple 'export' attributes not allowed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user