clippy lints

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-11-27 12:06:01 +01:00
parent f483228623
commit 81e9f75763
2 changed files with 3 additions and 3 deletions

View File

@ -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,
})

View File

@ -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");