summaryrefslogtreecommitdiffstats
path: root/ffi-macros
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-04-07 21:38:09 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2021-04-09 13:13:59 +0200
commit792dfa2105e0a75a27ebffdc1cf0ab8873deaac1 (patch)
treef4770d8297c001ef624c7e716a6c45e8c5ea6b63 /ffi-macros
parent8b49cc933cbeda3e34420679288c4985abdc6059 (diff)
Lint: Use char for single characters.
- https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern - https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
Diffstat (limited to 'ffi-macros')
-rw-r--r--ffi-macros/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ffi-macros/src/lib.rs b/ffi-macros/src/lib.rs
index 27c6a183..29a49d85 100644
--- a/ffi-macros/src/lib.rs
+++ b/ffi-macros/src/lib.rs
@@ -67,7 +67,7 @@ pub fn cdecl(_attr: TokenStream, item: TokenStream) -> TokenStream {
let mut cdecl = TokenStream2::new();
doc(" # C Declaration", &mut cdecl);
doc(" ```c", &mut cdecl);
- for line in rust2c::rust2c(&fun).split("\n") {
+ for line in rust2c::rust2c(&fun).split('\n') {
doc(&format!(" {}", line), &mut cdecl);
}
doc(" ```", &mut cdecl);
@@ -212,11 +212,11 @@ pub fn ffi_wrapper_type(args: TokenStream, input: TokenStream) -> TokenStream {
"name" => name = Some(value),
"prefix" => prefix = Some(value),
"derive" => {
- for ident in value.split(",").map(|d| d.trim()
+ for ident in value.split(',').map(|d| d.trim()
.to_string()) {
let (ident, arg) =
if let Some(i) = ident.find('(') {
- if ! ident.ends_with(")") {
+ if ! ident.ends_with(')') {
return syn::Error::new(
mnv.path.span(),
format!("missing closing \