Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix clippy warnings #235

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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