Skip to content

Commit

Permalink
chore: fix clippy warnings. (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptondereau authored Mar 13, 2023
1 parent 5d775a5 commit 6b6489f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
12 changes: 3 additions & 9 deletions crates/macros/src/impl_.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use std::collections::HashMap;

use anyhow::{anyhow, bail, Result};
use darling::{FromMeta, ToTokens};
use proc_macro2::TokenStream;
use quote::quote;
use std::collections::HashMap;
use syn::{Attribute, AttributeArgs, ItemImpl, Lit, Meta, NestedMeta};

use crate::helpers::get_docs;
Expand All @@ -20,22 +19,17 @@ pub enum Visibility {
Private,
}

#[derive(Debug, Copy, Clone, FromMeta)]
#[derive(Debug, Copy, Clone, FromMeta, Default)]
pub enum RenameRule {
#[darling(rename = "none")]
None,
#[darling(rename = "camelCase")]
#[default]
Camel,
#[darling(rename = "snake_case")]
Snake,
}

impl Default for RenameRule {
fn default() -> Self {
RenameRule::Camel
}
}

impl RenameRule {
/// Change case of an identifier.
///
Expand Down
1 change: 0 additions & 1 deletion src/zend/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ impl ClassEntry {
.contains(ClassFlags::ResolvedInterfaces)
.then(|| unsafe {
(0..self.num_interfaces)
.into_iter()
.map(move |i| *self.__bindgen_anon_3.interfaces.offset(i as _))
.filter_map(|ptr| ptr.as_ref())
})
Expand Down

0 comments on commit 6b6489f

Please sign in to comment.