Skip to content

Latest nightly report #12069

Open
Open
@amircodota

Description

@amircodota

Summary

warning: this `let...else` may be rewritten with the `?` operator --> cloud2/snippet_suggestions/src/snippet_prompt/mod.rs:229:9 | 229 | / let Some(enricher_args): Option<EnricherArgs> = args.into() else { 230 | | return None; 231 | | }; | |__________^ help: replace it with: `let enricher_args = args.into()?;` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark = note: `#[warn(clippy::question_mark)]` on by default

This does not work because the From impl does not match

args is of type args: &SnippetAutocompleteRequest,

This is the From impl

impl<'a> From<&'a SnippetAutocompleteRequest<'a>> for Option<EnricherArgs<'a>> {

Lint Name

clippy::question_mark

Reproducer

No response

Version

cargo +nightly --version                                                                                                                          cargo 1.77.0-nightly (ac6bbb332 2023-12-26)

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveT-middleType: Probably requires verifiying types

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions