Fold imfs::new back into imfs

This commit is contained in:
Lucien Greathouse
2019-09-19 15:25:07 -07:00
parent fc6f84897f
commit 71968fca0d
18 changed files with 30 additions and 40 deletions

View File

@@ -9,7 +9,7 @@ use failure::Fail;
use rbx_dom_weak::RbxInstanceProperties;
use crate::{
imfs::new::{FsError, Imfs, RealFetcher, WatchMode},
imfs::{FsError, Imfs, RealFetcher, WatchMode},
snapshot::{apply_patch_set, compute_patch_set, InstancePropertiesWithMeta, RojoTree},
snapshot_middleware::snapshot_from_imfs,
};

View File

@@ -4,7 +4,7 @@ use failure::Fail;
use rbx_dom_weak::RbxInstanceProperties;
use crate::{
imfs::new::{Imfs, RealFetcher, WatchMode},
imfs::{Imfs, RealFetcher, WatchMode},
project::{Project, ProjectLoadError},
serve_session::ServeSession,
snapshot::{apply_patch_set, compute_patch_set, InstancePropertiesWithMeta, RojoTree},

View File

@@ -6,7 +6,7 @@ use reqwest::header::{ACCEPT, CONTENT_TYPE, COOKIE, USER_AGENT};
use crate::{
auth_cookie::get_auth_cookie,
imfs::new::{Imfs, RealFetcher, WatchMode},
imfs::{Imfs, RealFetcher, WatchMode},
snapshot::{apply_patch_set, compute_patch_set, InstancePropertiesWithMeta, RojoTree},
snapshot_middleware::snapshot_from_imfs,
};

View File

@@ -6,12 +6,8 @@ mod real_fetcher;
mod snapshot;
pub use error::*;
pub mod new {
pub use super::error::*;
pub use super::fetcher::*;
pub use super::imfs::*;
pub use super::noop_fetcher::*;
pub use super::real_fetcher::*;
pub use super::snapshot::*;
}
pub use fetcher::*;
pub use imfs::*;
pub use noop_fetcher::*;
pub use real_fetcher::*;
pub use snapshot::*;

View File

@@ -4,7 +4,7 @@ use std::{
};
use crate::{
imfs::new::{Imfs, ImfsFetcher},
imfs::{Imfs, ImfsFetcher},
message_queue::MessageQueue,
project::Project,
session_id::SessionId,

View File

@@ -5,7 +5,7 @@ use rbx_dom_weak::{RbxId, RbxTree, RbxValue};
use serde::Serialize;
use crate::{
imfs::new::{Imfs, ImfsEntry, ImfsFetcher},
imfs::{Imfs, ImfsEntry, ImfsFetcher},
snapshot::InstanceSnapshot,
};
@@ -136,7 +136,7 @@ fn convert_localization_csv(contents: &[u8]) -> String {
mod test {
use super::*;
use crate::imfs::new::{ImfsSnapshot, NoopFetcher};
use crate::imfs::{ImfsSnapshot, NoopFetcher};
#[test]
fn csv_from_imfs() {

View File

@@ -3,7 +3,7 @@ use std::{borrow::Cow, collections::HashMap};
use rbx_dom_weak::{RbxId, RbxTree};
use crate::{
imfs::new::{DirectorySnapshot, Imfs, ImfsEntry, ImfsFetcher, ImfsSnapshot},
imfs::{DirectorySnapshot, Imfs, ImfsEntry, ImfsFetcher, ImfsSnapshot},
snapshot::InstanceSnapshot,
};
@@ -78,7 +78,7 @@ mod test {
use maplit::hashmap;
use crate::imfs::new::NoopFetcher;
use crate::imfs::NoopFetcher;
#[test]
fn empty_folder() {

View File

@@ -5,7 +5,7 @@ use rbx_reflection::try_resolve_value;
use serde::Deserialize;
use crate::{
imfs::new::{Imfs, ImfsEntry, ImfsFetcher},
imfs::{Imfs, ImfsEntry, ImfsFetcher},
snapshot::InstanceSnapshot,
};
@@ -136,7 +136,7 @@ mod test {
use maplit::hashmap;
use rbx_dom_weak::RbxValue;
use crate::imfs::new::{ImfsSnapshot, NoopFetcher};
use crate::imfs::{ImfsSnapshot, NoopFetcher};
#[test]
fn model_from_imfs() {

View File

@@ -4,7 +4,7 @@ use maplit::hashmap;
use rbx_dom_weak::{RbxId, RbxTree, RbxValue};
use crate::{
imfs::new::{FsResultExt, Imfs, ImfsEntry, ImfsFetcher},
imfs::{FsResultExt, Imfs, ImfsEntry, ImfsFetcher},
snapshot::InstanceSnapshot,
};
@@ -141,7 +141,7 @@ mod test {
use maplit::hashmap;
use crate::imfs::new::{ImfsSnapshot, NoopFetcher};
use crate::imfs::{ImfsSnapshot, NoopFetcher};
#[test]
fn module_from_imfs() {

View File

@@ -3,10 +3,7 @@ use std::path::{Path, PathBuf};
use rbx_dom_weak::{RbxId, RbxTree};
use crate::{
imfs::{
new::{Imfs, ImfsEntry, ImfsFetcher, ImfsSnapshot},
FsResult,
},
imfs::{FsResult, Imfs, ImfsEntry, ImfsFetcher, ImfsSnapshot},
snapshot::InstanceSnapshot,
};

View File

@@ -28,7 +28,7 @@ use self::{
rbxmx::SnapshotRbxmx,
txt::SnapshotTxt,
};
use crate::imfs::new::{Imfs, ImfsEntry, ImfsFetcher};
use crate::imfs::{Imfs, ImfsEntry, ImfsFetcher};
macro_rules! middlewares {
( $($middleware: ident,)* ) => {

View File

@@ -4,10 +4,7 @@ use rbx_dom_weak::{RbxId, RbxTree};
use rbx_reflection::try_resolve_value;
use crate::{
imfs::{
new::{Imfs, ImfsEntry, ImfsFetcher},
FsErrorKind,
},
imfs::{FsErrorKind, Imfs, ImfsEntry, ImfsFetcher},
project::{Project, ProjectNode},
snapshot::{InstanceMetadata, InstanceSnapshot},
};
@@ -146,7 +143,7 @@ mod test {
use maplit::hashmap;
use rbx_dom_weak::RbxValue;
use crate::imfs::new::{ImfsSnapshot, NoopFetcher};
use crate::imfs::{ImfsSnapshot, NoopFetcher};
#[test]
fn project_from_folder() {

View File

@@ -3,7 +3,7 @@ use std::{borrow::Cow, collections::HashMap};
use rbx_dom_weak::{RbxId, RbxInstanceProperties, RbxTree};
use crate::{
imfs::new::{Imfs, ImfsEntry, ImfsFetcher},
imfs::{Imfs, ImfsEntry, ImfsFetcher},
snapshot::InstanceSnapshot,
};
@@ -66,7 +66,7 @@ impl SnapshotMiddleware for SnapshotRbxm {
mod test {
use super::*;
use crate::imfs::new::{ImfsSnapshot, NoopFetcher};
use crate::imfs::{ImfsSnapshot, NoopFetcher};
#[test]
fn model_from_imfs() {

View File

@@ -3,7 +3,7 @@ use std::borrow::Cow;
use rbx_dom_weak::{RbxId, RbxTree};
use crate::{
imfs::new::{Imfs, ImfsEntry, ImfsFetcher},
imfs::{Imfs, ImfsEntry, ImfsFetcher},
snapshot::InstanceSnapshot,
};
@@ -64,7 +64,7 @@ mod test {
use std::collections::HashMap;
use crate::imfs::new::{ImfsSnapshot, NoopFetcher};
use crate::imfs::{ImfsSnapshot, NoopFetcher};
#[test]
fn model_from_imfs() {

View File

@@ -4,7 +4,7 @@ use maplit::hashmap;
use rbx_dom_weak::{RbxId, RbxTree, RbxValue};
use crate::{
imfs::new::{FileSnapshot, Imfs, ImfsEntry, ImfsFetcher, ImfsSnapshot},
imfs::{FileSnapshot, Imfs, ImfsEntry, ImfsFetcher, ImfsSnapshot},
snapshot::InstanceSnapshot,
};
@@ -94,7 +94,7 @@ mod test {
use maplit::hashmap;
use rbx_dom_weak::RbxInstanceProperties;
use crate::imfs::new::NoopFetcher;
use crate::imfs::NoopFetcher;
#[test]
fn instance_from_imfs() {

View File

@@ -9,7 +9,7 @@ use hyper::{service::Service, Body, Method, Request, StatusCode};
use rbx_dom_weak::RbxId;
use crate::{
imfs::new::ImfsFetcher,
imfs::ImfsFetcher,
serve_session::ServeSession,
web::{
interface::{

View File

@@ -12,7 +12,7 @@ use futures::{
use hyper::{service::Service, Body, Request, Response, Server};
use log::trace;
use crate::{imfs::new::ImfsFetcher, serve_session::ServeSession};
use crate::{imfs::ImfsFetcher, serve_session::ServeSession};
use self::{api::ApiService, ui::UiService};

View File

@@ -7,7 +7,7 @@ use hyper::{header, service::Service, Body, Method, Request, Response, StatusCod
use ritz::html;
use crate::{
imfs::new::ImfsFetcher,
imfs::ImfsFetcher,
serve_session::ServeSession,
web::{
interface::{ErrorResponse, SERVER_VERSION},