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>,
}
impl Into<Id> for Account {
fn into(self) -> Id {
self.id
impl From<Account> for Id {
fn from(account: Account) -> Id {
account.id
}
}

View file

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

View file

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