[ty] Move SystemOrVendoredPathRef

This moves the type and adds a few methods so that it can
be used elsewhere.
This commit is contained in:
Andrew Gallant 2025-07-10 12:52:32 -04:00 committed by Andrew Gallant
parent 729fa12575
commit 948463aafa
3 changed files with 51 additions and 23 deletions

View file

@ -17,6 +17,10 @@ impl VendoredPath {
unsafe { &*(path as *const Utf8Path as *const VendoredPath) }
}
pub fn file_name(&self) -> Option<&str> {
self.0.file_name()
}
pub fn to_path_buf(&self) -> VendoredPathBuf {
VendoredPathBuf(self.0.to_path_buf())
}