From 112b6865de0ad4610e46dc44ab105e43a3712f19 Mon Sep 17 00:00:00 2001 From: Stu Black Date: Tue, 23 Jul 2019 17:56:56 -0400 Subject: [PATCH] Move mark & compact GC to top-level module. --- src/lib.rs | 1 + src/{mutators => }/mark_compact.rs | 0 src/{mutators/mod.rs => mutators.rs} | 2 -- src/view.rs | 2 +- 4 files changed, 2 insertions(+), 3 deletions(-) rename src/{mutators => }/mark_compact.rs (100%) rename src/{mutators/mod.rs => mutators.rs} (99%) diff --git a/src/lib.rs b/src/lib.rs index d7c0e0d..6d42ccb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,6 +13,7 @@ //! * [mutators](mutators/index.html) is a read-write analogue of `nav`. pub(crate) mod base; +pub(crate) mod mark_compact; pub mod mutators; pub mod nav; pub mod search; diff --git a/src/mutators/mark_compact.rs b/src/mark_compact.rs similarity index 100% rename from src/mutators/mark_compact.rs rename to src/mark_compact.rs diff --git a/src/mutators/mod.rs b/src/mutators.rs similarity index 99% rename from src/mutators/mod.rs rename to src/mutators.rs index 0d20e74..0212b77 100644 --- a/src/mutators/mod.rs +++ b/src/mutators.rs @@ -14,8 +14,6 @@ use crate::Graph; use symbol_map::indexing::{Indexing, Insertion}; use symbol_map::SymbolId; -pub(crate) mod mark_compact; - /// Mutable handle to a graph vertex ("node handle"). /// /// This zipper-like type enables traversal of a graph along the vertex's diff --git a/src/view.rs b/src/view.rs index 29ed7fc..e64d5b7 100644 --- a/src/view.rs +++ b/src/view.rs @@ -473,7 +473,7 @@ where /// As `retain_reachable_from`, but working over raw `VertexId`s. fn retain_reachable_from_ids(mut self, root_ids: &[VertexId]) { - mutators::mark_compact::Collector::retain_reachable(&mut self.graph, root_ids); + crate::mark_compact::Collector::retain_reachable(&mut self.graph, root_ids); } }