Enable clippy
This commit is contained in:
1 parent
4f1894ff5c
commit
b6903bf558
14 files changed
+46
-50
No files matched your search
@@ -41,7 +41,7 @@ pub fn format_args_f_impl(input: IfmtInput) -> Result<TokenStream> {
|
||||
let mut out_format_literal = defer(&mut *out_format_literal, |it| {
|
||||
it.push(colon_or_closing_brace)
|
||||
});
|
||||
let out_format_literal: &mut String = &mut *out_format_literal;
|
||||
let out_format_literal: &mut String = *out_format_literal;
|
||||
let mut arg = s[i + 1..end].trim();
|
||||
if let Some("=") = arg.get(arg.len().saturating_sub(1)..) {
|
||||
assert_eq!(
|
||||
|
||||
@@ -270,7 +270,7 @@ mod field_info {
|
||||
pub setter: SetterSettings,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct SetterSettings {
|
||||
pub doc: Option<syn::Expr>,
|
||||
pub skip: bool,
|
||||
@@ -278,17 +278,6 @@ mod field_info {
|
||||
pub strip_option: bool,
|
||||
}
|
||||
|
||||
impl Default for SetterSettings {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
doc: Default::default(),
|
||||
skip: false,
|
||||
auto_into: false,
|
||||
strip_option: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FieldBuilderAttr {
|
||||
pub fn with(mut self, attrs: &[syn::Attribute]) -> Result<Self, Error> {
|
||||
let mut skip_tokens = None;
|
||||
|
||||
@@ -181,7 +181,7 @@ impl Parse for ComponentField {
|
||||
return Ok(Self { name, content });
|
||||
}
|
||||
|
||||
if name.to_string() == "key" {
|
||||
if name == "key" {
|
||||
let content = ContentField::ManExpr(input.parse()?);
|
||||
return Ok(Self { name, content });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user