Skip to content

Commit

Permalink
style: Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Nov 29, 2024
1 parent f288be9 commit cf46667
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ impl<'de, B: crate::backend::HeapStr> serde::Deserialize<'de> for KStringBase<B>
struct StringVisitor<B>(std::marker::PhantomData<B>);

#[cfg(feature = "serde")]
impl<'de, B: crate::backend::HeapStr> serde::de::Visitor<'de> for StringVisitor<B> {
impl<B: crate::backend::HeapStr> serde::de::Visitor<'_> for StringVisitor<B> {
type Value = KStringBase<B>;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
4 changes: 2 additions & 2 deletions src/string_cow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ impl<B: crate::backend::HeapStr> std::str::FromStr for KStringCowBase<'_, B> {
}

#[cfg(feature = "serde")]
impl<'s, B: crate::backend::HeapStr> serde::Serialize for KStringCowBase<'s, B> {
impl<B: crate::backend::HeapStr> serde::Serialize for KStringCowBase<'_, B> {
#[inline]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
Expand All @@ -363,7 +363,7 @@ impl<'s, B: crate::backend::HeapStr> serde::Serialize for KStringCowBase<'s, B>
}

#[cfg(feature = "serde")]
impl<'de, 's, B: crate::backend::HeapStr> serde::Deserialize<'de> for KStringCowBase<'s, B> {
impl<'de, B: crate::backend::HeapStr> serde::Deserialize<'de> for KStringCowBase<'_, B> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
Expand Down
2 changes: 1 addition & 1 deletion src/string_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ impl<'s> From<&'s str> for KStringRef<'s> {
}

#[cfg(feature = "serde")]
impl<'s> serde::Serialize for KStringRef<'s> {
impl serde::Serialize for KStringRef<'_> {
#[inline]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
Expand Down

0 comments on commit cf46667

Please sign in to comment.