rust-analyzer / smol_str

Apache License 2.0
447 stars 54 forks source link

feat: impl `AsRef<OsStr>` #49

Closed saiintbrisson closed 2 months ago

saiintbrisson commented 2 years ago

There are cases in std where functions expect a T: AsRef<OsStr> when working with OS-related operations like getting env vars through std::env::var.

This may be too niche to be worth adding, and is not necessarily related to the original purpose of "programming language tokens", so feel free to close!

Veykril commented 2 months ago

Will be done by https://github.com/rust-analyzer/smol_str/pull/82, I think it makes sense to roughly implement what str implements in terms of std traits