summaryrefslogtreecommitdiffstats
path: root/ffi-macros/src/lib.rs
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-04-07 20:35:38 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2021-04-09 13:13:59 +0200
commit73b3321d98e0298dba5d4ef63e8058a01cc2943c (patch)
tree0b5ef2427f8d95085c2819c8e9dba02c3c6f0c65 /ffi-macros/src/lib.rs
parent19169b76117db8b1d81f1aafa64a5440d042803d (diff)
Lint: Use next instead of nth(0).
- https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
Diffstat (limited to 'ffi-macros/src/lib.rs')
-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 6f0ca859..c4bb0269 100644
--- a/ffi-macros/src/lib.rs
+++ b/ffi-macros/src/lib.rs
@@ -393,7 +393,7 @@ fn derive_conversion_functions(mut st: syn::ItemStruct,
let generics = &st.generics;
let ref_lifetime = if generics.lifetimes().count() > 0 {
- generics.lifetimes().nth(0).unwrap().clone()
+ generics.lifetimes().next().unwrap().clone()
} else {
syn::parse_quote!('static)
};