change ? to into() in errors

makes clippy happy
This commit is contained in:
Eric S. Londres 2021-03-28 15:09:16 -04:00
parent db9f6edfef
commit 22b50397f4
Signed by: slondr
GPG Key ID: A2D25B4D5CB970E4
1 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ async fn get_beer_count(chat_id: i64) -> AsyncResult<i64> {
if let sqlite::State::Row = statement.next().unwrap() {
Ok(statement.read::<i64>(0)?)
} else {
Err("could not retrieve beer count")?
Err("could not retrieve beer count".into())
}
}
@ -79,7 +79,7 @@ async fn quaff(id: i64) -> AsyncResult<String> {
c.execute(format!("DELETE FROM tap WHERE id={}", id))?;
Ok(text)
} else {
Err("could not retrieve beer text")?
Err("could not retrieve beer text".into())
}
}
@ -94,7 +94,7 @@ async fn harvest_corn() -> AsyncResult<String> {
let img_url = &parsed_response.unwrap()["urls"]["raw"];
Ok(img_url.to_string())
} else {
Err("You don't have a farm.")?
Err("You don't have a farm.".into())
}
}