Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
nameexhaustion committed Aug 30, 2024
1 parent 30a36f4 commit 96ac672
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions crates/polars-utils/src/pl_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,24 @@ impl AsRef<str> for PlSmallStr {
}
}

impl core::ops::Deref for PlSmallStr {
type Target = str;

#[inline(always)]
fn deref(&self) -> &Self::Target {
self.as_str()
}
}

impl core::borrow::Borrow<str> for PlSmallStr {
#[inline(always)]
fn borrow(&self) -> &str {
self.as_str()
}
}

/// AsRef impls for other types

impl AsRef<std::path::Path> for PlSmallStr {
fn as_ref(&self) -> &std::path::Path {
self.as_str().as_ref()
Expand All @@ -96,24 +114,6 @@ impl AsRef<std::ffi::OsStr> for PlSmallStr {
}
}

impl core::ops::Deref for PlSmallStr {
type Target = str;

#[inline(always)]
fn deref(&self) -> &Self::Target {
self.as_str()
}
}

impl core::borrow::Borrow<str> for PlSmallStr {
#[inline(always)]
fn borrow(&self) -> &str {
self.as_str()
}
}

/// AsRef impls for other types (TODO)

/// From impls

impl From<&str> for PlSmallStr {
Expand Down

0 comments on commit 96ac672

Please sign in to comment.