Switch from .to_string() to .to_owned()
This commit is contained in:
parent
3ecd434580
commit
654bc5c7f8
6 changed files with 13 additions and 13 deletions
src/lemmy
|
@ -48,7 +48,7 @@ pub(crate) async fn login(credentials: &Credentials, instance: &str) -> Result<L
|
|||
};
|
||||
|
||||
let response = match HTTP_CLIENT
|
||||
.post(instance.to_string() + "/api/v3/user/login")
|
||||
.post(instance.to_owned() + "/api/v3/user/login")
|
||||
.json(&login_params)
|
||||
.send()
|
||||
.await {
|
||||
|
@ -62,7 +62,7 @@ pub(crate) async fn login(credentials: &Credentials, instance: &str) -> Result<L
|
|||
match data.jwt {
|
||||
Some(token) => Ok(Lemmy {
|
||||
jwt_token: token.clone(),
|
||||
instance: instance.to_string(),
|
||||
instance: instance.to_owned(),
|
||||
}),
|
||||
None => panic!("Login did not return JWT token. Are the credentials valid?")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue