mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 03:36:06 +00:00
rustfmt the codebase
This commit is contained in:
parent
fea303ac8b
commit
7fb9aa2115
45 changed files with 766 additions and 764 deletions
|
|
@ -1,12 +1,6 @@
|
|||
use std::{
|
||||
fmt,
|
||||
error::Error,
|
||||
path::PathBuf,
|
||||
};
|
||||
use std::{error::Error, fmt, path::PathBuf};
|
||||
|
||||
use crate::{
|
||||
snapshot::InstanceSnapshot,
|
||||
};
|
||||
use crate::snapshot::InstanceSnapshot;
|
||||
|
||||
pub type SnapshotResult<'a> = Result<Option<InstanceSnapshot<'a>>, SnapshotError>;
|
||||
|
||||
|
|
@ -43,9 +37,7 @@ impl SnapshotError {
|
|||
path: impl Into<PathBuf>,
|
||||
) -> SnapshotError {
|
||||
SnapshotError {
|
||||
detail: SnapshotErrorDetail::FileContentsBadUnicode {
|
||||
inner,
|
||||
},
|
||||
detail: SnapshotErrorDetail::FileContentsBadUnicode { inner },
|
||||
path: Some(path.into()),
|
||||
}
|
||||
}
|
||||
|
|
@ -70,9 +62,7 @@ impl fmt::Display for SnapshotError {
|
|||
pub enum SnapshotErrorDetail {
|
||||
FileDidNotExist,
|
||||
FileNameBadUnicode,
|
||||
FileContentsBadUnicode {
|
||||
inner: std::str::Utf8Error,
|
||||
},
|
||||
FileContentsBadUnicode { inner: std::str::Utf8Error },
|
||||
}
|
||||
|
||||
impl SnapshotErrorDetail {
|
||||
|
|
@ -81,7 +71,7 @@ impl SnapshotErrorDetail {
|
|||
|
||||
match self {
|
||||
FileContentsBadUnicode { inner } => Some(inner),
|
||||
_ => None
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -93,7 +83,9 @@ impl fmt::Display for SnapshotErrorDetail {
|
|||
match self {
|
||||
FileDidNotExist => write!(formatter, "file did not exist"),
|
||||
FileNameBadUnicode => write!(formatter, "file name had malformed Unicode"),
|
||||
FileContentsBadUnicode { inner } => write!(formatter, "file had malformed unicode: {}", inner),
|
||||
FileContentsBadUnicode { inner } => {
|
||||
write!(formatter, "file had malformed unicode: {}", inner)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue