From 496a693f86f894bd9474fc442fc54aa9f3d3d1cc Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 28 Jun 2022 17:16:53 +0200 Subject: [PATCH] Remove `shape::Update` It is no longer being used. --- crates/fj-kernel/src/shape/mod.rs | 2 -- crates/fj-kernel/src/shape/stores.rs | 9 --------- crates/fj-kernel/src/shape/update.rs | 16 ---------------- 3 files changed, 27 deletions(-) delete mode 100644 crates/fj-kernel/src/shape/update.rs diff --git a/crates/fj-kernel/src/shape/mod.rs b/crates/fj-kernel/src/shape/mod.rs index a410d6731..b71f45e78 100644 --- a/crates/fj-kernel/src/shape/mod.rs +++ b/crates/fj-kernel/src/shape/mod.rs @@ -6,12 +6,10 @@ mod api; mod local; mod object; mod stores; -mod update; pub use self::{ api::Shape, local::LocalForm, object::Object, stores::{Handle, Iter}, - update::Update, }; diff --git a/crates/fj-kernel/src/shape/stores.rs b/crates/fj-kernel/src/shape/stores.rs index 96d31668a..468781bbe 100644 --- a/crates/fj-kernel/src/shape/stores.rs +++ b/crates/fj-kernel/src/shape/stores.rs @@ -81,15 +81,6 @@ impl Store { } } - pub fn update(&mut self, mut f: F) - where - F: FnMut(&mut T), - { - for (_, object) in self.objects.write().iter_mut() { - f(object); - } - } - fn ptr(&self) -> *const () { Arc::as_ptr(&self.objects) as _ } diff --git a/crates/fj-kernel/src/shape/update.rs b/crates/fj-kernel/src/shape/update.rs deleted file mode 100644 index 8218da478..000000000 --- a/crates/fj-kernel/src/shape/update.rs +++ /dev/null @@ -1,16 +0,0 @@ -use super::{stores::Stores, Object}; - -/// API to update a `Shape` -/// -/// See [`Shape::update`]. -pub struct Update<'r> { - stores: &'r mut Stores, -} - -impl<'r> Update<'r> { - /// Update all objects of a specific type - pub fn update_all(self, f: impl FnMut(&mut T)) -> Self { - self.stores.get::().update(f); - self - } -}