From f89d491f296fbeb634ad81a527930184e0920ba1 Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Wed, 13 Dec 2017 12:05:11 -0800 Subject: [PATCH] Run rustfmt I ignored some odd formatting it introduced relating to putting braces on newlines in if-let blocks. This might be a bug, but I didn't find any way to turn that off. --- src/pathext.rs | 12 ++++++++++-- src/vfs_watch.rs | 4 ++-- src/web.rs | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/pathext.rs b/src/pathext.rs index 1fd49a80..10f654d5 100644 --- a/src/pathext.rs +++ b/src/pathext.rs @@ -31,7 +31,11 @@ fn test_path_to_route() { assert_eq!(path_to_route(root, value), result); } - t(Path::new("/a/b/c"), Path::new("/a/b/c/d"), Some(vec!["d".to_string()])); + t( + Path::new("/a/b/c"), + Path::new("/a/b/c/d"), + Some(vec!["d".to_string()]), + ); t(Path::new("/a/b"), Path::new("a"), None); } @@ -42,7 +46,11 @@ fn test_path_to_route_windows() { assert_eq!(path_to_route(root, value), result); } - t(Path::new("C:\\foo"), Path::new("C:\\foo\\bar\\baz"), Some(vec!["bar".to_string(), "baz".to_string()])); + t( + Path::new("C:\\foo"), + Path::new("C:\\foo\\bar\\baz"), + Some(vec!["bar".to_string(), "baz".to_string()]), + ); } /// Turns the path into an absolute one, using the current working directory if diff --git a/src/vfs_watch.rs b/src/vfs_watch.rs index 84808805..697b9ff6 100644 --- a/src/vfs_watch.rs +++ b/src/vfs_watch.rs @@ -4,9 +4,9 @@ use std::time::Duration; use notify::{DebouncedEvent, RecommendedWatcher, RecursiveMode, Watcher}; -use vfs::Vfs; -use pathext::path_to_route; use core::Config; +use pathext::path_to_route; +use vfs::Vfs; pub struct VfsWatcher { vfs: Arc>, diff --git a/src/web.rs b/src/web.rs index e8ba8bc0..12c936ae 100644 --- a/src/web.rs +++ b/src/web.rs @@ -8,7 +8,7 @@ use serde_json; use core::Config; use project::Project; -use vfs::{Vfs, VfsItem, VfsChange}; +use vfs::{Vfs, VfsChange, VfsItem}; static MAX_BODY_SIZE: usize = 25 * 1024 * 1025; // 25 MiB