mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-20 20:55:50 +00:00
Add VfsItem::name to make comparisons easier
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user