style: rustfmt the tree so the CI lint check passes

This commit is contained in:
Karim Jerbi committed 2026-10-15 04:10:06 +01:00
1 parent 1317a7b4fd
commit 6025d8be44
128 files changed
+4097 -1676

No files matched your search

+6 -1
View File
@@ -786,7 +786,12 @@ impl OpenCADStudio {
self.push_undo_snapshot(i, "BLOCK");
let name = options.name.clone();
let redefined = options.redefine
&& self.tabs[i].scene.document.block_records.get(&name).is_some();
&& self.tabs[i]
.scene
.document
.block_records
.get(&name)
.is_some();
match self.tabs[i].scene.create_block_with_options(*options) {
Ok(insert_handle) => {
self.tabs[i].dirty = true;
+3 -1
View File
@@ -889,7 +889,9 @@ impl OpenCADStudio {
CmdResult::Show { p1, p2 } => {
let i = self.active_tab;
self.tabs[i].scene.remember_current_view();
self.tabs[i].scene.zoom_to_window(p1.as_vec3(), p2.as_vec3());
self.tabs[i]
.scene
.zoom_to_window(p1.as_vec3(), p2.as_vec3());
}
CmdResult::CommitAndZoom { entity, p1, p2 } => {
self.handle_commit_entities_and_exit(vec![entity], false, false);
+17 -14
View File
@@ -114,14 +114,14 @@ impl OpenCADStudio {
}
}
let created = match history {
Some(history) => {
self.add_surface_model_with_history(surface, body, history)
}
Some(history) => self.add_surface_model_with_history(surface, body, history),
None => self.add_surface_model(surface, body),
};
// An associative surface keeps reading its profile.
if sweep_model::surface_associativity() && path.is_none() && !created.is_null() {
use crate::scene::model::surface_sources::{link_surface_sources, SurfaceSources};
use crate::scene::model::surface_sources::{
link_surface_sources, SurfaceSources,
};
let (height, given) = match extent {
ExtrudeExtent::Height(height) => (height, None),
_ => (direction.length(), Some(direction)),
@@ -129,7 +129,12 @@ impl OpenCADStudio {
link_surface_sources(
&mut self.tabs[i].scene.document,
created,
&SurfaceSources::Extrude { profile: *handle, height, direction: given, taper: taper_angle },
&SurfaceSources::Extrude {
profile: *handle,
height,
direction: given,
taper: taper_angle,
},
);
associative_sources.push(*handle);
}
@@ -385,18 +390,14 @@ impl OpenCADStudio {
continue;
};
let created = self.add_surface_model(
empty_revolved_surface(
&entity,
axis_start,
axis_end,
angle,
start_angle,
),
empty_revolved_surface(&entity, axis_start, axis_end, angle, start_angle),
body,
);
// An associative surface keeps reading its profile and axis.
if sweep_model::surface_associativity() && !created.is_null() {
use crate::scene::model::surface_sources::{link_surface_sources, SurfaceSources};
use crate::scene::model::surface_sources::{
link_surface_sources, SurfaceSources,
};
link_surface_sources(
&mut self.tabs[i].scene.document,
created,
@@ -758,7 +759,9 @@ impl OpenCADStudio {
crate::scene::model::surface_sources::link_surface_sources(
&mut self.tabs[i].scene.document,
handle,
&crate::scene::model::surface_sources::SurfaceSources::Loft { sections: single },
&crate::scene::model::surface_sources::SurfaceSources::Loft {
sections: single,
},
);
associative = true;
}