*: Fix clippy warnings (#2139)

* Fix needless question mark operator

* Don't convert from u64 to u64

LocalStreamId is already a u64, no need to convert.

* Don't use `.into()` to convert to the same type

* Don't specify lifetime if it can be inferred

* Use `vec!` macro if we immediately push to it

This creates the vector with the appropriate capacity.

* Don't index array when taking a reference is enough

Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
Thomas Eizinger
2021-07-16 23:11:25 +10:00
committed by GitHub
parent e1646a524b
commit 20183c1ea1
8 changed files with 15 additions and 16 deletions

View File

@ -211,7 +211,7 @@ impl ProtocolsHandler for IdentifyHandler {
};
Poll::Ready(ev)
}
Poll::Ready(Err(err)) => Poll::Ready(ProtocolsHandlerEvent::Close(err.into()))
Poll::Ready(Err(err)) => Poll::Ready(ProtocolsHandlerEvent::Close(err))
}
}
}