Skip to content

Accepting std::path::Path in imwrite, etc? #681

@nk9

Description

@nk9

Currently, imwrite, imread, etc. take &str as the path argument. This is kind of annoying if you're dealing with std::path::Paths, which have to be turned into &strs. Is there a reason we can't accept AsRef<Path> there instead? This would allow callers to pass &str/String OR Path/PathBuf. Accepting this can even be done with a macro, if code aesthetics is a concern. It's also possible to do this without generics by accepting impl AsRef<Path>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions