summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/prehashed.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/prehashed.rs b/src/util/prehashed.rs
index bab1c8f8..866bda5b 100644
--- a/src/util/prehashed.rs
+++ b/src/util/prehashed.rs
@@ -1,8 +1,10 @@
-use std::any::Any;
use std::fmt::{self, Debug, Formatter};
use std::hash::{Hash, Hasher};
use std::ops::Deref;
+#[cfg(feature = "layout-cache")]
+use std::any::Any;
+
/// A wrapper around a type that precomputes its hash.
#[derive(Copy, Clone)]
pub struct Prehashed<T: ?Sized> {