fix: remove unused implementations
This commit is contained in:
parent
8eed67ab69
commit
0c0e2b1cea
1 changed files with 0 additions and 20 deletions
20
src/user.rs
20
src/user.rs
|
|
@ -1,7 +1,5 @@
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
use std::borrow::Borrow;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, Hash, Eq, PartialEq, PartialOrd, Ord)]
|
#[derive(Clone, Debug, Hash, Eq, PartialEq, PartialOrd, Ord)]
|
||||||
pub struct User {
|
pub struct User {
|
||||||
pub nickname: Option<String>,
|
pub nickname: Option<String>,
|
||||||
|
|
@ -52,21 +50,3 @@ impl UserUnwrapped {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PartialEq<String> for UserUnwrapped {
|
|
||||||
fn eq(&self, other: &String) -> bool {
|
|
||||||
self.username == other.clone()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl PartialEq<UserUnwrapped> for String {
|
|
||||||
fn eq(&self, other: &UserUnwrapped) -> bool {
|
|
||||||
self == &other.username.clone()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Borrow<String> for UserUnwrapped {
|
|
||||||
fn borrow(&self) -> &String {
|
|
||||||
&self.username
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue