diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-07 20:35:38 +0200 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-09 13:13:59 +0200 |
commit | 73b3321d98e0298dba5d4ef63e8058a01cc2943c (patch) | |
tree | 0b5ef2427f8d95085c2819c8e9dba02c3c6f0c65 /ipc/src/sexp.rs | |
parent | 19169b76117db8b1d81f1aafa64a5440d042803d (diff) |
Lint: Use next instead of nth(0).
- https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
Diffstat (limited to 'ipc/src/sexp.rs')
-rw-r--r-- | ipc/src/sexp.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/src/sexp.rs b/ipc/src/sexp.rs index 3d25862d..2290b615 100644 --- a/ipc/src/sexp.rs +++ b/ipc/src/sexp.rs @@ -64,7 +64,7 @@ impl Sexp { }; let value = self.get(b"value")?.ok_or_else(not_a_session_key)? - .into_iter().nth(0).ok_or_else(not_a_session_key)?; + .into_iter().next().ok_or_else(not_a_session_key)?; match value { Sexp::String(ref s) => match recipient.mpis() { @@ -153,7 +153,7 @@ impl Sexp { }; let sig = self.get(b"sig-val")?.ok_or_else(not_a_signature)? - .into_iter().nth(0).ok_or_else(not_a_signature)?; + .into_iter().next().ok_or_else(not_a_signature)?; if let Some(param) = sig.get(b"eddsa")? { let r = param.iter().find_map(|p| { |