mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Add VfsItem::name to make comparisons easier
This commit is contained in:
parent
67ac6b7cec
commit
d365bc076e
1 changed files with 9 additions and 0 deletions
|
|
@ -41,6 +41,15 @@ pub enum VfsItem {
|
|||
Dir { name: String, children: HashMap<String, VfsItem> },
|
||||
}
|
||||
|
||||
impl VfsItem {
|
||||
pub fn name(&self) -> &String {
|
||||
match self {
|
||||
&VfsItem::File { ref name, .. } => name,
|
||||
&VfsItem::Dir { ref name, .. } => name,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Vfs {
|
||||
pub fn new(config: Config) -> Vfs {
|
||||
Vfs {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue