Take advantage of 2018 edition.

- Remove explicit 'extern crate' fields where useful
- Fix mutability of variable (unrelated?)
- Add rbxmx dependency, which needs 2018 edition
This commit is contained in:
Lucien Greathouse
2018-11-27 10:50:52 -08:00
parent 6617b8b6c4
commit f7689f3154
6 changed files with 32 additions and 17 deletions

View File

@@ -35,7 +35,7 @@ impl PathIdTree {
pub fn insert(&mut self, path: &Path, id: RbxId) {
if let Some(parent_path) = path.parent() {
if let Some(mut parent) = self.nodes.get_mut(parent_path) {
if let Some(parent) = self.nodes.get_mut(parent_path) {
parent.children.insert(path.to_path_buf());
}
}
@@ -48,7 +48,7 @@ impl PathIdTree {
pub fn remove(&mut self, root_path: &Path) -> Option<RbxId> {
if let Some(parent_path) = root_path.parent() {
if let Some(mut parent) = self.nodes.get_mut(parent_path) {
if let Some(parent) = self.nodes.get_mut(parent_path) {
parent.children.remove(root_path);
}
}