mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
rustfmt the codebase
This commit is contained in:
parent
fea303ac8b
commit
7fb9aa2115
45 changed files with 766 additions and 764 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue