Skip to content

Simplify lease extension logic by using extract_if() #4883

@dbolduc

Description

@dbolduc

pub fn retain(&mut self, max_lease_extension: Duration) -> Vec<Vec<String>> {

This logic could be simplified if we used extract_if(). The only problem is it was added in Rust version 1.88, which is higher than our MSRV.

When we bump to MSRV of 1.88, we should revisit this code.

#4880 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: cleanupAn internal cleanup or hygiene concern.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions