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

@@ -1,8 +1,5 @@
#[macro_use] extern crate clap;
#[macro_use] extern crate log;
extern crate env_logger;
extern crate librojo;
use std::{
path::{Path, PathBuf},

View File

@@ -1,13 +1,8 @@
#[macro_use] extern crate log;
#[macro_use] extern crate rouille;
#[macro_use] extern crate serde_derive;
extern crate notify;
extern crate rand;
extern crate rbx_tree;
extern crate regex;
extern crate serde;
extern crate serde_json;
extern crate uuid;
#[macro_use]
extern crate log;
#[macro_use]
extern crate serde_derive;
#[cfg(test)]
extern crate tempfile;

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);
}
}

View File

@@ -4,7 +4,12 @@ use std::{
sync::{mpsc, Arc},
};
use rouille::{self, Request, Response};
use rouille::{
self,
router,
Request,
Response,
};
use rbx_tree::{RbxId, RootedRbxInstance};
use crate::{