Skip to content

Prefer display() over to_string_lossy() when showing paths #5435

@anthonydmays

Description

@anthonydmays

Per the discussion in PR #5195, we inconsistently use to_string_lossy() or display() when showing paths to the user. As I understand it, we should use display() whenever showing paths to the user and to_string_lossy() when providing to APIs or saving to a datastore/logs.

Discussion that seems relevant: https://internals.rust-lang.org/t/i-think-the-name-path-display-should-be-replaced-with-path-display-lossy/20713/10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions