mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-25 07:06:12 +00:00
Fix project clippy lints (#683)
The fourth in a series of PRs that aim to get CI passing
This commit is contained in:
@@ -127,11 +127,10 @@ impl Project {
|
|||||||
contents: &[u8],
|
contents: &[u8],
|
||||||
project_file_location: &Path,
|
project_file_location: &Path,
|
||||||
) -> Result<Self, ProjectError> {
|
) -> Result<Self, ProjectError> {
|
||||||
let mut project: Self =
|
let mut project: Self = serde_json::from_slice(contents).map_err(|source| Error::Json {
|
||||||
serde_json::from_slice(&contents).map_err(|source| Error::Json {
|
source,
|
||||||
source,
|
path: project_file_location.to_owned(),
|
||||||
path: project_file_location.to_owned(),
|
})?;
|
||||||
})?;
|
|
||||||
|
|
||||||
project.file_location = project_file_location.to_path_buf();
|
project.file_location = project_file_location.to_path_buf();
|
||||||
project.check_compatibility();
|
project.check_compatibility();
|
||||||
@@ -197,8 +196,8 @@ pub enum PathNode {
|
|||||||
impl PathNode {
|
impl PathNode {
|
||||||
pub fn path(&self) -> &Path {
|
pub fn path(&self) -> &Path {
|
||||||
match self {
|
match self {
|
||||||
PathNode::Required(pathbuf) => &pathbuf,
|
PathNode::Required(pathbuf) => pathbuf,
|
||||||
PathNode::Optional(OptionalPathNode { optional }) => &optional,
|
PathNode::Optional(OptionalPathNode { optional }) => optional,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user