From e4cca9b8ff4e2d551aec282b6e5ba3b1973c8d25 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 5 Jul 2019 05:58:10 -0400 Subject: [PATCH] disallow (and remove) dead-code --- src/derived.rs | 2 -- src/lib.rs | 1 - src/runtime.rs | 5 ----- 3 files changed, 8 deletions(-) diff --git a/src/derived.rs b/src/derived.rs index fdef3881..768b78af 100644 --- a/src/derived.rs +++ b/src/derived.rs @@ -123,8 +123,6 @@ where .or_insert_with(|| Arc::new(Slot::new(key.clone()))) .clone() } - - fn remove_lru(&self) {} } impl QueryStorageOps for DerivedStorage diff --git a/src/lib.rs b/src/lib.rs index 4c52a142..b5e563df 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,5 @@ #![warn(rust_2018_idioms)] #![warn(missing_docs)] -#![allow(dead_code)] //! The salsa crate is a crate for incremental recomputation. It //! permits you to define a "database" of queries with both inputs and diff --git a/src/runtime.rs b/src/runtime.rs index 649865d5..2a26b4e1 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -159,11 +159,6 @@ where db.for_each_query(|query_storage| query_storage.sweep(db, strategy)); } - /// True if `d` represents the max durability level. - pub(crate) fn is_constant(&self, d: Durability) -> bool { - d == self.max_durability() - } - /// Returns the max durability, used for constants. pub(crate) fn max_durability(&self) -> Durability { Durability::new(self.shared_state.revisions.len() - 1)