Rust `ends_with` and `strip_prefix` behavior differences in `Path` and `str`

As I’m writing an ignore library, I’m having subtle bugs caused by Rust’s Path behavior.

/rust/ /Path/ /str/ /std/