mirror of
https://github.com/PR0M3TH3AN/Marlin.git
synced 2025-09-09 15:48:43 +00:00
Format codebase with rustfmt
This commit is contained in:
@@ -28,7 +28,9 @@ fn generate_cheatsheet() -> Result<(), Box<dyn std::error::Error>> {
|
||||
for (cmd_name_val, cmd_details_val) in cmds {
|
||||
let cmd_name = cmd_name_val.as_str().unwrap_or("");
|
||||
if let Value::Mapping(cmd_details) = cmd_details_val {
|
||||
if let Some(Value::Mapping(actions)) = cmd_details.get(&Value::String("actions".into())) {
|
||||
if let Some(Value::Mapping(actions)) =
|
||||
cmd_details.get(&Value::String("actions".into()))
|
||||
{
|
||||
for (action_name_val, action_body_val) in actions {
|
||||
let action_name = action_name_val.as_str().unwrap_or("");
|
||||
let flags = if let Value::Mapping(action_map) = action_body_val {
|
||||
@@ -45,7 +47,11 @@ fn generate_cheatsheet() -> Result<(), Box<dyn std::error::Error>> {
|
||||
};
|
||||
|
||||
let flags_disp = if flags.is_empty() { "—" } else { &flags };
|
||||
table.push_str(&format!("| `{}` | {} |\n", format!("{} {}", cmd_name, action_name), flags_disp));
|
||||
table.push_str(&format!(
|
||||
"| `{}` | {} |\n",
|
||||
format!("{} {}", cmd_name, action_name),
|
||||
flags_disp
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user