forked from Roflin/gamenight
Fixes some Clippy remarks.
This commit is contained in:
@@ -11,21 +11,21 @@ use crate::util::GetConnection;
|
||||
use crate::schema::{self};
|
||||
use serde_json;
|
||||
|
||||
impl Into<schema::user::LoginUser> for Login {
|
||||
fn into(self) -> schema::user::LoginUser {
|
||||
impl From<Login> for schema::user::LoginUser {
|
||||
fn from(val: Login) -> Self {
|
||||
schema::user::LoginUser {
|
||||
username: self.username,
|
||||
password: self.password
|
||||
username: val.username,
|
||||
password: val.password
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<schema::user::Register> for Register {
|
||||
fn into(self) -> schema::user::Register {
|
||||
impl From<Register> for schema::user::Register {
|
||||
fn from(val: Register) -> Self {
|
||||
schema::user::Register {
|
||||
email: self.email,
|
||||
username: self.username,
|
||||
password: self.password
|
||||
email: val.email,
|
||||
username: val.username,
|
||||
password: val.password
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ pub async fn register(pool: web::Data<DbPool>, register_data: web::Json<Register
|
||||
Ok(())
|
||||
}).await??;
|
||||
|
||||
return Ok(HttpResponse::Ok())
|
||||
Ok(HttpResponse::Ok())
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user