Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun committed Jan 10, 2025
1 parent 2db4a1b commit a61f95d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/kv/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -443,16 +442,16 @@ 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<Cow<'v, str>> {
pub fn to_cow_str(&self) -> Option<std::borrow::Cow<'v, str>> {
self.inner.to_str()
}
}

#[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<Cow<'v, str>> {
self.inner.to_borrowed_str().map(Cow::Borrowed)
pub fn to_cow_str(&self) -> Option<std::borrow::Cow<'v, str>> {
self.inner.to_borrowed_str().map(std::borrow::Cow::Borrowed)
}
}

Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down

0 comments on commit a61f95d

Please sign in to comment.