mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-24 06:35:39 +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> },
|
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 {
|
impl Vfs {
|
||||||
pub fn new(config: Config) -> Vfs {
|
pub fn new(config: Config) -> Vfs {
|
||||||
Vfs {
|
Vfs {
|
||||||
|
|||||||
Reference in New Issue
Block a user