mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Refactor code for improved readability by consolidating multi-line statements into single lines across various modules, including JSON serialization, snapshot middleware, and file name validation.
This commit is contained in:
parent
4caac7a31c
commit
2dfcac4ef7
8 changed files with 32 additions and 25 deletions
|
|
@ -48,7 +48,10 @@ pub fn name_for_inst<'old>(
|
|||
encoded
|
||||
} else {
|
||||
validate_file_name(&new_inst.name).with_context(|| {
|
||||
format!("name '{}' is not legal to write to the file system", new_inst.name)
|
||||
format!(
|
||||
"name '{}' is not legal to write to the file system",
|
||||
new_inst.name
|
||||
)
|
||||
})?;
|
||||
new_inst.name.clone()
|
||||
};
|
||||
|
|
@ -65,7 +68,10 @@ pub fn name_for_inst<'old>(
|
|||
encoded
|
||||
} else {
|
||||
validate_file_name(&new_inst.name).with_context(|| {
|
||||
format!("name '{}' is not legal to write to the file system", new_inst.name)
|
||||
format!(
|
||||
"name '{}' is not legal to write to the file system",
|
||||
new_inst.name
|
||||
)
|
||||
})?;
|
||||
new_inst.name.clone()
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue