Skip to content

Use std::ops::ControlFlow in ‘extract function’ assist #10272

Closed
@lunacookies

Description

@lunacookies

Currently when triggering ‘extract function’ on a section of code that contains break, the assist will make the extracted function return a boolean to indicate whether the caller should break out of the loop. Now that std::ops::ControlFlow has been stabilised, it might be better to return ControlFlow::Break if the caller should break, and use if let instead of let in the caller.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-assistsS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions