Skip to content

Consider adding clippy::has_significant_drop attribute to Object #448

@silverpill

Description

@silverpill

Documentation: https://doc.rust-lang.org/clippy/attribs.html#clippyhas_significant_drop

If significant_drop_in_scrutinee lint is enabled, a warning would be generated about an un-intuitive behavior of temporaries in match scrutinees that might lead to deadlocks:

match make_query(&pool.get().await.unwrap()) {
    Ok(_) => {
        // Connection still not returned to the pool!
    }
    ...
};
// Connection is only released here

See also: rust-lang/rust#93883

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-coreArea: Core / deadpoolquality of lifeImprovements to the API resulting in a better quality of life for the users of deadpool.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions