Run cargo fix --edition-idioms
This commit is contained in:
parent
e1bbc2fdb0
commit
7bd7e7ec7d
|
@ -157,7 +157,7 @@ impl CertifiedKey {
|
|||
}
|
||||
/// Try to extract a CertifiedKey from a Reader, given that we have
|
||||
/// already read its type as `key_type`.
|
||||
fn from_reader(key_type: KeyType, r: &mut Reader) -> Result<Self> {
|
||||
fn from_reader(key_type: KeyType, r: &mut Reader<'_>) -> Result<Self> {
|
||||
Ok(match key_type {
|
||||
KeyType::ED25519_KEY => CertifiedKey::Ed25519(r.extract()?),
|
||||
KeyType::SHA256_OF_RSA => CertifiedKey::RSASha256Digest(r.extract()?),
|
||||
|
|
|
@ -311,7 +311,7 @@ impl<'a, K: Keyword> Item<'a, K> {
|
|||
self.args
|
||||
}
|
||||
/// Return the arguments of this item as a vector.
|
||||
fn args_as_vec(&self) -> Ref<Vec<&'a str>> {
|
||||
fn args_as_vec(&self) -> Ref<'_, Vec<&'a str>> {
|
||||
// We're using an interior mutability pattern here to lazily
|
||||
// construct the vector.
|
||||
if self.split_args.borrow().is_none() {
|
||||
|
|
|
@ -31,7 +31,7 @@ impl RelayCell {
|
|||
*(array_mut_ref![w, len_pos, 2]) = (payload_len as u16).to_be_bytes();
|
||||
w
|
||||
}
|
||||
fn decode_from_reader(r: &mut Reader) -> Result<Self> {
|
||||
fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self> {
|
||||
let cmd = r.take_u8()?.into();
|
||||
r.advance(2)?; // "recognized"
|
||||
let streamid = StreamID(r.take_u16()?);
|
||||
|
|
Loading…
Reference in New Issue