sudo
sudo copied to clipboard
rpc_bindings.rs: Fix `mismatched_lifetime_syntaxes` error
After Rust 1.89.0 version, Lifetime elision lint added. This creates error: hiding a lifetime that's elided elsewhere is confusing error and requires <'_> for obvious time validation.
error: hiding a lifetime that's elided elsewhere is confusing
--> sudo\src\rpc_bindings.rs:16:19
|
16 | pub fn new(s: &str) -> Utf8Str {
| ^^^^ ------- the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `-D mismatched-lifetime-syntaxes` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(mismatched_lifetime_syntaxes)]`
help: use `'_` for type paths
|
16 | pub fn new(s: &str) -> Utf8Str<'_> {
| ++++
error: could not compile `sudo` (bin "sudo") due to 1 previous error