Repository: tokio-rs/prost (language: rust)

Issue:
Fix clippy warnings introduced with 2021 edition

Fix warnings with 1.51
There were a few warnings introduced with rust 1.51 we should fix these.


Discussion / hints:
So I looked into this just because I was curious, and noticed that there were a decent number of warnings already showing up without changing the edition. Would you be willing to take a look at a PR that addresses existing warnings? 
I gave it a whirl. If you have a chance to take a look at some point I'd appreciate it!
Just to follow up on this, it seems like moving up from edition 2018 to 2021 causes problems because edition 2021 was unstable at the time of release of `rustc` 1.51, and therefore doesn't successfully compile. So we're kinda stuck here until we can up the MSRV to 1.56, which is when edition 2021 was introduced. 

Given the MSRV must be from at least 6 months ago, that means we can set 1.56 as the MSRV to address this on April 21, 2022 or later. (1.56 was released on Oct 21, 2021). 
That being said, we can fix clippy errors with 2021 in stable, we just can't set the library to 2021. 
Yeah I am good to fix clippy errors, we can follow up on the edition update.


Fix patch:
diff --git a/Cargo.toml b/Cargo.toml
index 85304f60c..3d8c98aff 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,7 +12,8 @@ readme = "README.md"
 description = "A Protocol Buffers implementation for the Rust Language."
 keywords = ["protobuf", "serialization"]
 categories = ["encoding"]
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
 
 [workspace]
 members = [


Test patch: