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:
Joe 2026-01-20 20:48:52 -06:00
parent 4caac7a31c
commit 2dfcac4ef7
8 changed files with 32 additions and 25 deletions

View file

@ -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()
};