🚑️ fix
This commit is contained in:
parent
fedb81c485
commit
b58ccf4af3
4 changed files with 40 additions and 31 deletions
18
src/api.rs
18
src/api.rs
|
@ -17,7 +17,7 @@ pub struct LoginParam {
|
|||
pub password: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
#[derive(Deserialize, Serialize, Clone)]
|
||||
/// Join Request
|
||||
pub struct JoinParams {
|
||||
/// Optional join token
|
||||
|
@ -150,6 +150,14 @@ impl<T: Serialize> Result<T> {
|
|||
Err(self.err.unwrap())
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn Err(msg: &str) -> Self {
|
||||
Self {
|
||||
ok: None,
|
||||
err: Some(msg.to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Result<i32> {
|
||||
|
@ -160,14 +168,6 @@ impl Result<i32> {
|
|||
err: None,
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn Err(msg: &str) -> Self {
|
||||
Self {
|
||||
ok: None,
|
||||
err: Some(msg.to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue