style: apply cargo fmt across workspace

This commit is contained in:
Karim Jerbi committed 2026-10-11 03:14:29 +01:00
1 parent 85710e5454
commit 9cf9ff2c5c
531 files changed
+57740 -33906

No files matched your search

+23 -30
View File
@@ -62,8 +62,12 @@ impl OpenCADStudio {
let i = self.active_tab;
let doc_layers = self.tabs[i].scene.document.layers.clone();
let vp_info = self.tabs[i].scene.viewport_list();
let names_before: Vec<String> =
self.tabs[i].layers.layers.iter().map(|l| l.name.clone()).collect();
let names_before: Vec<String> = self.tabs[i]
.layers
.layers
.iter()
.map(|l| l.name.clone())
.collect();
self.tabs[i]
.layers
.sync_with_viewports(&doc_layers, vp_info);
@@ -105,7 +109,13 @@ impl OpenCADStudio {
let active = self.tabs[i].active_layer.clone();
let vp_column = self.tabs[i].scene.active_viewport.and_then(|vp| {
(self.tabs[i].scene.current_layout != "Model")
.then(|| self.tabs[i].layers.vp_cols.iter().position(|c| c.handle == vp))
.then(|| {
self.tabs[i]
.layers
.vp_cols
.iter()
.position(|c| c.handle == vp)
})
.flatten()
});
let infos: Vec<crate::ui::ribbon::LayerInfo> = self.tabs[i]
@@ -174,10 +184,7 @@ impl OpenCADStudio {
let active_text = if text_names.contains(&active_text) {
active_text
} else {
text_names
.first()
.cloned()
.unwrap_or_default()
text_names.first().cloned().unwrap_or_default()
};
let dim_names: Vec<String> = doc.dim_styles.iter().map(|s| s.name.clone()).collect();
@@ -185,10 +192,7 @@ impl OpenCADStudio {
let active_dim = if dim_names.contains(&active_dim) {
active_dim
} else {
dim_names
.first()
.cloned()
.unwrap_or_default()
dim_names.first().cloned().unwrap_or_default()
};
let mleader_names: Vec<String> = doc
@@ -202,22 +206,14 @@ impl OpenCADStudio {
}
})
.collect();
let current_mleader =
doc.header.current_mleader_style_name.clone();
let current_mleader = doc.header.current_mleader_style_name.clone();
let active_mleader =
mleader_names
.iter()
.find(|name| {
name.eq_ignore_ascii_case(
&current_mleader
)
})
.cloned()
.or_else(|| {
mleader_names.first().cloned()
})
.unwrap_or_default();
let active_mleader = mleader_names
.iter()
.find(|name| name.eq_ignore_ascii_case(&current_mleader))
.cloned()
.or_else(|| mleader_names.first().cloned())
.unwrap_or_default();
let table_names: Vec<String> = doc
.objects
@@ -234,10 +230,7 @@ impl OpenCADStudio {
let active_table = if table_names.contains(&active_table) {
active_table
} else {
table_names
.first()
.cloned()
.unwrap_or_default()
table_names.first().cloned().unwrap_or_default()
};
let active_mleader2 = active_mleader.clone();