Skip to content

Fix mismatched_lifetime_syntaxes warnings#338

Merged
valeriansaliou merged 1 commit intovaleriansaliou:masterfrom
anthonyroussel:fix-warnings
Feb 17, 2026
Merged

Fix mismatched_lifetime_syntaxes warnings#338
valeriansaliou merged 1 commit intovaleriansaliou:masterfrom
anthonyroussel:fix-warnings

Conversation

@anthonyroussel
Copy link
Contributor

Fixes the mismatched lifetime syntaxes warnings.

Rust 1.89 includes a new lint for mismatched lifetime syntaxes:

warning: hiding a lifetime that's elided elsewhere is confusing
   --> src/channel/message.rs:153:25
    |
153 |     fn extract(message: &str) -> (String, SplitWhitespace) {
    |                         ^^^^              ^^^^^^^^^^^^^^^ 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: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
    |
153 |     fn extract(message: &str) -> (String, SplitWhitespace<'_>) {
    |                                                          ++++

@valeriansaliou valeriansaliou merged commit f41688b into valeriansaliou:master Feb 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants