rewrite Into<Id> as From<T>

This commit is contained in:
anna 2022-12-07 17:13:08 +01:00
parent b709ad2a12
commit 81be3b4e7b
Signed by: fef
GPG key ID: EC22E476DC2D3D84
3 changed files with 9 additions and 9 deletions

View file

@ -20,8 +20,8 @@ pub struct NewAccount {
pub display_name: Option<String>, pub display_name: Option<String>,
} }
impl Into<Id> for Account { impl From<Account> for Id {
fn into(self) -> Id { fn from(account: Account) -> Id {
self.id account.id
} }
} }

View file

@ -24,8 +24,8 @@ pub struct NewStatus {
pub sensitive: bool, pub sensitive: bool,
} }
impl Into<Id> for Status { impl From<Status> for Id {
fn into(self) -> Id { fn from(status: Status) -> Id {
self.id status.id
} }
} }

View file

@ -17,8 +17,8 @@ pub struct NewUser {
pub password: String, pub password: String,
} }
impl Into<Id> for User { impl From<User> for Id {
fn into(self) -> Id { fn from(user: User) -> Id {
self.id user.id
} }
} }