use std::{
borrow::Cow,
path::{Path, PathBuf},
};
use crate::JustString;
impl PartialEq for JustString<'_> {
fn eq(&self, other: &Self) -> bool {
**self == **other
}
}
impl PartialEq<&str> for JustString<'_> {
fn eq(&self, other: &&str) -> bool {
&**self == *other
}
}
impl PartialEq<JustString<'_>> for &str {
fn eq(&self, other: &JustString<'_>) -> bool {
*self == &**other
}
}
impl<'a> PartialEq<Cow<'a, str>> for JustString<'_> {
fn eq(&self, other: &Cow<'a, str>) -> bool {
&**self == other
}
}
impl PartialEq<JustString<'_>> for Cow<'_, str> {
fn eq(&self, other: &JustString<'_>) -> bool {
self == &**other
}
}
impl PartialEq<Path> for JustString<'_> {
fn eq(&self, other: &Path) -> bool {
&**self == other
}
}
impl PartialEq<JustString<'_>> for Path {
fn eq(&self, other: &JustString<'_>) -> bool {
self == &**other
}
}
impl PartialEq<PathBuf> for JustString<'_> {
fn eq(&self, other: &PathBuf) -> bool {
&**self == other
}
}
impl PartialEq<JustString<'_>> for PathBuf {
fn eq(&self, other: &JustString<'_>) -> bool {
self == &**other
}
}
impl PartialEq<str> for JustString<'_> {
fn eq(&self, other: &str) -> bool {
&**self == other
}
}
impl PartialEq<JustString<'_>> for str {
fn eq(&self, other: &JustString<'_>) -> bool {
self == &**other
}
}
impl PartialOrd for JustString<'_> {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
Some(self.cmp(other))
}
}