From a61f95d19a1f841ca8fe82f0130f81f8d7aa74ee Mon Sep 17 00:00:00 2001 From: tison Date: Fri, 10 Jan 2025 08:49:25 +0800 Subject: [PATCH] tidy Signed-off-by: tison --- src/kv/value.rs | 7 +++---- src/lib.rs | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/kv/value.rs b/src/kv/value.rs index 067469b75..6616ee961 100644 --- a/src/kv/value.rs +++ b/src/kv/value.rs @@ -3,7 +3,6 @@ //! This module defines the [`Value`] type and supporting APIs for //! capturing and serializing them. -use alloc::borrow::Cow; use std::fmt; pub use crate::kv::Error; @@ -443,7 +442,7 @@ mod std_support { #[cfg(all(feature = "std", feature = "value-bag"))] impl<'v> Value<'v> { /// Try to convert this value into a string. - pub fn to_cow_str(&self) -> Option> { + pub fn to_cow_str(&self) -> Option> { self.inner.to_str() } } @@ -451,8 +450,8 @@ impl<'v> Value<'v> { #[cfg(all(feature = "std", not(feature = "value-bag")))] impl<'v> Value<'v> { /// Try to convert this value into a string. - pub fn to_cow_str(&self) -> Option> { - self.inner.to_borrowed_str().map(Cow::Borrowed) + pub fn to_cow_str(&self) -> Option> { + self.inner.to_borrowed_str().map(std::borrow::Cow::Borrowed) } } diff --git a/src/lib.rs b/src/lib.rs index f7b8011a5..2e70f3141 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -389,7 +389,6 @@ compile_error!("multiple release_max_level_* features set"); #[cfg(all(not(feature = "std"), not(test)))] extern crate core as std; -extern crate alloc; use std::cfg; #[cfg(feature = "std")]