mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-03 21:24:29 +00:00
[ty] Move SystemOrVendoredPathRef
This moves the type and adds a few methods so that it can be used elsewhere.
This commit is contained in:
parent
729fa12575
commit
948463aafa
3 changed files with 51 additions and 23 deletions
|
|
@ -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())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue