From 26b8f87ccf0b76244dd8ba142b80bcb28053fdc1 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 7 Nov 2023 13:06:47 +0100 Subject: [PATCH] Update documentation of update operations The old versions were no longer correct, due to the changes to the `Handles` API. --- crates/fj-core/src/operations/update/cycle.rs | 9 ++++----- crates/fj-core/src/operations/update/region.rs | 9 ++++----- crates/fj-core/src/operations/update/shell.rs | 9 ++++----- crates/fj-core/src/operations/update/sketch.rs | 9 ++++----- crates/fj-core/src/operations/update/solid.rs | 9 ++++----- 5 files changed, 20 insertions(+), 25 deletions(-) diff --git a/crates/fj-core/src/operations/update/cycle.rs b/crates/fj-core/src/operations/update/cycle.rs index 0268b5016..2ad9e97de 100644 --- a/crates/fj-core/src/operations/update/cycle.rs +++ b/crates/fj-core/src/operations/update/cycle.rs @@ -16,9 +16,9 @@ pub trait UpdateCycle { /// /// # Panics /// - /// Uses [`Handles::replace`] internally, and panics for the same reasons. + /// Panics, if the object can't be found. /// - /// [`Handles::replace`]: crate::objects::Handles::replace + /// Panics, if the update results in a duplicate object. #[must_use] fn update_half_edge( &self, @@ -33,10 +33,9 @@ pub trait UpdateCycle { /// /// # Panics /// - /// Uses [`Handles::replace_with_multiple`] internally, and panics for the - /// same reasons. + /// Panics, if the object can't be found. /// - /// [`Handles::replace_with_multiple`]: crate::objects::Handles::replace_with_multiple + /// Panics, if the update results in a duplicate object. #[must_use] fn replace_half_edge( &self, diff --git a/crates/fj-core/src/operations/update/region.rs b/crates/fj-core/src/operations/update/region.rs index 6b99d2379..d9613611c 100644 --- a/crates/fj-core/src/operations/update/region.rs +++ b/crates/fj-core/src/operations/update/region.rs @@ -23,9 +23,9 @@ pub trait UpdateRegion { /// /// # Panics /// - /// Uses [`Handles::replace`] internally, and panics for the same reasons. + /// Panics, if the object can't be found. /// - /// [`Handles::replace`]: crate::objects::Handles::replace + /// Panics, if the update results in a duplicate object. #[must_use] fn update_interior( &self, @@ -40,10 +40,9 @@ pub trait UpdateRegion { /// /// # Panics /// - /// Uses [`Handles::replace_with_multiple`] internally, and panics for the - /// same reasons. + /// Panics, if the object can't be found. /// - /// [`Handles::replace_with_multiple`]: crate::objects::Handles::replace_with_multiple + /// Panics, if the update results in a duplicate object. #[must_use] fn replace_interior( &self, diff --git a/crates/fj-core/src/operations/update/shell.rs b/crates/fj-core/src/operations/update/shell.rs index 8bd3b09e5..1216a6b89 100644 --- a/crates/fj-core/src/operations/update/shell.rs +++ b/crates/fj-core/src/operations/update/shell.rs @@ -13,9 +13,9 @@ pub trait UpdateShell { /// /// # Panics /// - /// Uses [`Handles::replace`] internally, and panics for the same reasons. + /// Panics, if the object can't be found. /// - /// [`Handles::replace`]: crate::objects::Handles::replace + /// Panics, if the update results in a duplicate object. #[must_use] fn update_face( &self, @@ -30,10 +30,9 @@ pub trait UpdateShell { /// /// # Panics /// - /// Uses [`Handles::replace_with_multiple`] internally, and panics for the - /// same reasons. + /// Panics, if the object can't be found. /// - /// [`Handles::replace_with_multiple`]: crate::objects::Handles::replace_with_multiple + /// Panics, if the update results in a duplicate object. #[must_use] fn replace_face( &self, diff --git a/crates/fj-core/src/operations/update/sketch.rs b/crates/fj-core/src/operations/update/sketch.rs index 8107b6bea..3faffcb80 100644 --- a/crates/fj-core/src/operations/update/sketch.rs +++ b/crates/fj-core/src/operations/update/sketch.rs @@ -13,9 +13,9 @@ pub trait UpdateSketch { /// /// # Panics /// - /// Uses [`Handles::replace`] internally, and panics for the same reasons. + /// Panics, if the object can't be found. /// - /// [`Handles::replace`]: crate::objects::Handles::replace + /// Panics, if the update results in a duplicate object. #[must_use] fn update_region( &self, @@ -30,10 +30,9 @@ pub trait UpdateSketch { /// /// # Panics /// - /// Uses [`Handles::replace_with_multiple`] internally, and panics for the - /// same reasons. + /// Panics, if the object can't be found. /// - /// [`Handles::replace_with_multiple`]: crate::objects::Handles::replace_with_multiple + /// Panics, if the update results in a duplicate object. #[must_use] fn replace_region( &self, diff --git a/crates/fj-core/src/operations/update/solid.rs b/crates/fj-core/src/operations/update/solid.rs index 02d9dde27..02a44adda 100644 --- a/crates/fj-core/src/operations/update/solid.rs +++ b/crates/fj-core/src/operations/update/solid.rs @@ -16,9 +16,9 @@ pub trait UpdateSolid { /// /// # Panics /// - /// Uses [`Handles::replace`] internally, and panics for the same reasons. + /// Panics, if the object can't be found. /// - /// [`Handles::replace`]: crate::objects::Handles::replace + /// Panics, if the update results in a duplicate object. #[must_use] fn update_shell( &self, @@ -33,10 +33,9 @@ pub trait UpdateSolid { /// /// # Panics /// - /// Uses [`Handles::replace_with_multiple`] internally, and panics for the - /// same reasons. + /// Panics, if the object can't be found. /// - /// [`Handles::replace_with_multiple`]: crate::objects::Handles::replace_with_multiple + /// Panics, if the update results in a duplicate object. #[must_use] fn replace_shell( &self,