You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Path type and similar also need the IString treatment when used in an environment that wants more immutability. Basically, copy the string module, add some Path-specific utilities, and then have a better experience with them.
In particular, the methods like canonicalize and read_dir should be mirrored to return IPath as opposed to be defaulted to via Deref to Path and PathBuf. This will let users stay in the immutable world a bit longer. Also a new method should be put in place (just like in &Path) to allow easy conversion from &str and such.
Some methods operate on OsString/OsStr. It might be preferable to cover them as well, but I am not sure if IOsString is desired. Maybe methods like file_name_lossy and into_iter_lossy should be added instead, that would give users IString instead.
I like the idea very much! You can already do something that seems good and refine later. I feel like a broken record lol but implicit-clone is really in alpha and I think we should allow ourselves some experimentation.
Activity
cecton commentedon Mar 3, 2025
I like the idea very much! You can already do something that seems good and refine later. I feel like a broken record lol but
implicit-cloneis really in alpha and I think we should allow ourselves some experimentation.