Linter changes
This commit is contained in:
parent
079e9f5e11
commit
40e142ccc7
6 changed files with 29 additions and 56 deletions
src/lemmy
|
@ -20,11 +20,11 @@ pub(crate) struct Credentials {
|
|||
|
||||
impl Credentials {
|
||||
pub(crate) fn get_username(&self) -> Sensitive<String> {
|
||||
return Sensitive::new(self.username.clone());
|
||||
Sensitive::new(self.username.clone())
|
||||
}
|
||||
|
||||
pub(crate) fn get_password(&self) -> Sensitive<String> {
|
||||
return Sensitive::new(self.password.clone());
|
||||
Sensitive::new(self.password.clone())
|
||||
}
|
||||
|
||||
pub(crate) fn set_credentials() -> Result<Self, VarError> {
|
||||
|
@ -63,10 +63,10 @@ pub(crate) async fn login(credentials: &Credentials, instance: &str) -> Result<L
|
|||
jwt_token: token.clone(),
|
||||
instance: instance.to_string(),
|
||||
}),
|
||||
None => Err(panic!("Login did not return JWT token. Are the credentials valid?"))
|
||||
None => panic!("Login did not return JWT token. Are the credentials valid?")
|
||||
}
|
||||
},
|
||||
status => Err(panic!("Unexpected HTTP Status '{}' during Login", status.to_string()))
|
||||
status => panic!("Unexpected HTTP Status '{}' during Login", status)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ impl Lemmy {
|
|||
communities.insert(community.name, community.id);
|
||||
}
|
||||
|
||||
return Ok(communities)
|
||||
Ok(communities)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue