diff options
Diffstat (limited to 'src/value/index.rs')
-rw-r--r-- | src/value/index.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/value/index.rs b/src/value/index.rs index d759a1d..0d90a5d 100644 --- a/src/value/index.rs +++ b/src/value/index.rs @@ -1,6 +1,9 @@ use super::Value; -use crate::lib::*; use crate::map::Map; +use alloc::borrow::ToOwned; +use alloc::string::String; +use core::fmt::{self, Display}; +use core::ops; /// A type that can be used to index into a `serde_json::Value`. /// @@ -133,14 +136,14 @@ mod private { pub trait Sealed {} impl Sealed for usize {} impl Sealed for str {} - impl Sealed for super::String {} + impl Sealed for alloc::string::String {} impl<'a, T> Sealed for &'a T where T: ?Sized + Sealed {} } /// Used in panic messages. struct Type<'a>(&'a Value); -impl<'a> fmt::Display for Type<'a> { +impl<'a> Display for Type<'a> { fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { match *self.0 { Value::Null => formatter.write_str("null"), |