rewrite Into<Id> as From<T>
This commit is contained in:
parent
b709ad2a12
commit
81be3b4e7b
3 changed files with 9 additions and 9 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue