Switch from .to_string() to .to_owned()

This commit is contained in:
Neshura 2023-12-29 14:34:33 +01:00
parent 3ecd434580
commit 654bc5c7f8
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
6 changed files with 13 additions and 13 deletions
src/lemmy

View file

@ -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?")
}