Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Jan 31, 2022
1 parent 8ab23be commit 0e2ee4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/libs/bindgen/src/helpers.rs
Expand Up @@ -208,7 +208,7 @@ fn gen_string_literal(value: &str) -> TokenStream {
tokens.push_str(&format!("{}", u.escape_default()));
}

tokens.push_str("\"");
tokens.push('\"');
tokens.into()
}

Expand Down Expand Up @@ -243,7 +243,7 @@ pub fn gen_constant_type_value(value: &ConstantValue) -> TokenStream {
ConstantValue::F32(value) => quote! { f32 = #value },
ConstantValue::F64(value) => quote! { f64 = #value },
ConstantValue::String(value) => {
let value = gen_string_literal(&value);
let value = gen_string_literal(value);
quote! { &'static str = #value }
}
_ => unimplemented!(),
Expand Down Expand Up @@ -289,7 +289,7 @@ pub fn gen_constant_value(value: &ConstantValue) -> TokenStream {
ConstantValue::I64(value) => quote! { #value },
ConstantValue::F32(value) => quote! { #value },
ConstantValue::F64(value) => quote! { #value },
ConstantValue::String(value) => gen_string_literal(&value),
ConstantValue::String(value) => gen_string_literal(value),
_ => unimplemented!(),
}
}
Expand Down

0 comments on commit 0e2ee4f

Please sign in to comment.