summaryrefslogtreecommitdiffstats
path: root/ffi-macros
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-04-07 21:23:38 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2021-04-09 13:13:59 +0200
commit8b49cc933cbeda3e34420679288c4985abdc6059 (patch)
tree1085c523be09c55de07160356dd9182c6a99bf61 /ffi-macros
parent253158696af836b4162fceadb29917f9eeb6d4a0 (diff)
Lint: Use get() instead of iter().next().
- https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice
Diffstat (limited to 'ffi-macros')
-rw-r--r--ffi-macros/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffi-macros/src/lib.rs b/ffi-macros/src/lib.rs
index a4e426cc..27c6a183 100644
--- a/ffi-macros/src/lib.rs
+++ b/ffi-macros/src/lib.rs
@@ -40,7 +40,7 @@ pub fn cdecl(_attr: TokenStream, item: TokenStream) -> TokenStream {
// Extract all information from the parsed function that we need
// to compose the new function.
- let summary = fun.attrs.iter().next();
+ let summary = fun.attrs.get(0);
let attrs = fun.attrs.iter().skip(1)
.fold(TokenStream2::new(),
|mut acc, attr| {