mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-25 07:06:12 +00:00
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:
@@ -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},
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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::{
|
||||
|
||||
Reference in New Issue
Block a user