rustfmt the codebase

This commit is contained in:
Lucien Greathouse 2019-08-27 15:10:34 -07:00
parent fea303ac8b
commit 7fb9aa2115
45 changed files with 766 additions and 764 deletions

View file

@ -1,18 +1,13 @@
use std::{
borrow::Cow,
collections::HashMap,
};
use std::{borrow::Cow, collections::HashMap};
use rbx_dom_weak::{RbxTree, RbxInstanceProperties, RbxId};
use rbx_dom_weak::{RbxId, RbxInstanceProperties, RbxTree};
use crate::{
imfs::new::{Imfs, ImfsFetcher, ImfsEntry},
imfs::new::{Imfs, ImfsEntry, ImfsFetcher},
snapshot::InstanceSnapshot,
};
use super::{
middleware::{SnapshotMiddleware, SnapshotInstanceResult, SnapshotFileResult},
};
use super::middleware::{SnapshotFileResult, SnapshotInstanceResult, SnapshotMiddleware};
pub struct SnapshotRbxm;
@ -25,16 +20,18 @@ impl SnapshotMiddleware for SnapshotRbxm {
return Ok(None);
}
let file_name = entry.path()
.file_name().unwrap().to_string_lossy();
let file_name = entry.path().file_name().unwrap().to_string_lossy();
if !file_name.ends_with(".rbxm") {
return Ok(None);
return Ok(None);
}
let instance_name = entry.path()
.file_stem().expect("Could not extract file stem")
.to_string_lossy().to_string();
let instance_name = entry
.path()
.file_stem()
.expect("Could not extract file stem")
.to_string_lossy()
.to_string();
let mut temp_tree = RbxTree::new(RbxInstanceProperties {
name: "DataModel".to_owned(),
@ -59,10 +56,7 @@ impl SnapshotMiddleware for SnapshotRbxm {
}
}
fn from_instance(
_tree: &RbxTree,
_id: RbxId,
) -> SnapshotFileResult {
fn from_instance(_tree: &RbxTree, _id: RbxId) -> SnapshotFileResult {
unimplemented!("Snapshotting models");
}
}
@ -93,4 +87,4 @@ mod test {
// property that currently deserializes incorrectly.
// See: https://github.com/rojo-rbx/rbx-dom/issues/49
}
}
}