mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-23 06:05:24 +00:00
Fix remaining clippy lints (#687)
The eighth (and final) in a series of PRs that aim to get CI passing
This commit is contained in:
2
build.rs
2
build.rs
@@ -54,7 +54,7 @@ fn main() -> Result<(), anyhow::Error> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let out_path = Path::new(&out_dir).join("plugin.bincode");
|
let out_path = Path::new(&out_dir).join("plugin.bincode");
|
||||||
let out_file = File::create(&out_path)?;
|
let out_file = File::create(out_path)?;
|
||||||
|
|
||||||
bincode::serialize_into(out_file, &snapshot)?;
|
bincode::serialize_into(out_file, &snapshot)?;
|
||||||
|
|
||||||
|
|||||||
@@ -219,12 +219,30 @@ fn is_valid_ident_char(value: char) -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn is_keyword(value: &str) -> bool {
|
fn is_keyword(value: &str) -> bool {
|
||||||
match value {
|
matches!(
|
||||||
"and" | "break" | "do" | "else" | "elseif" | "end" | "false" | "for" | "function"
|
value,
|
||||||
| "if" | "in" | "local" | "nil" | "not" | "or" | "repeat" | "return" | "then" | "true"
|
"and"
|
||||||
| "until" | "while" => true,
|
| "break"
|
||||||
_ => false,
|
| "do"
|
||||||
}
|
| "else"
|
||||||
|
| "elseif"
|
||||||
|
| "end"
|
||||||
|
| "false"
|
||||||
|
| "for"
|
||||||
|
| "function"
|
||||||
|
| "if"
|
||||||
|
| "in"
|
||||||
|
| "local"
|
||||||
|
| "nil"
|
||||||
|
| "not"
|
||||||
|
| "or"
|
||||||
|
| "repeat"
|
||||||
|
| "return"
|
||||||
|
| "then"
|
||||||
|
| "true"
|
||||||
|
| "until"
|
||||||
|
| "while"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Tells whether the given string is a valid Lua identifier.
|
/// Tells whether the given string is a valid Lua identifier.
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ where
|
|||||||
.as_os_str()
|
.as_os_str()
|
||||||
.to_str()
|
.to_str()
|
||||||
.expect("Invalid Unicode in file path, cannot serialize");
|
.expect("Invalid Unicode in file path, cannot serialize");
|
||||||
let replaced = as_str.replace("\\", "/");
|
let replaced = as_str.replace('\\', "/");
|
||||||
|
|
||||||
serializer.serialize_str(&replaced)
|
serializer.serialize_str(&replaced)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,11 +145,7 @@ fn property_filter(value: Option<&Variant>) -> bool {
|
|||||||
|
|
||||||
// Lua can't do anything with SharedString values. They also can't be
|
// Lua can't do anything with SharedString values. They also can't be
|
||||||
// serialized directly by Serde!
|
// serialized directly by Serde!
|
||||||
if ty == Some(VariantType::SharedString) {
|
ty != Some(VariantType::SharedString)
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Response body from /api/rojo
|
/// Response body from /api/rojo
|
||||||
|
|||||||
Reference in New Issue
Block a user