Skip to content

Add close method to File #59567

Closed
Closed
@czipperz

Description

@czipperz

Currently, as far as I know, there is no way to close a file and handle errors with closing it. It would be useful to add a method to File that allows us to handle any potential errors instead of them being ignored.

fn close(self) -> std::io::Result<()>

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions