Skip to content

Commit 1993076

Browse files
committed
chore: Make clippy happy
1 parent fdd82d8 commit 1993076

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/models/set_boolean.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ impl Default for True {
1212
#[derive(Debug, Deserialize, Serialize)]
1313
#[serde(transparent)]
1414
pub struct False(bool);
15+
#[allow(clippy::derivable_impls)] // I want the impl to be explict here
1516
impl Default for False {
1617
fn default() -> Self {
1718
Self(false)

src/util/comic_updater.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ impl ComicUpdater {
116116

117117
let (comic_image, comic_type): (u16, i32) = {
118118
let (comic_image, comic_type) = comic_image_url
119-
.rsplit_once("/")
119+
.rsplit_once('/')
120120
.ok_or_else(|| {
121121
anyhow::anyhow!(
122122
"Could not fetch front page, couldn't find '/' in comic image source"
123123
)
124124
})?
125125
.1
126-
.split_once(".")
126+
.split_once('.')
127127
.ok_or_else(|| {
128128
anyhow::anyhow!(
129129
"Could not fetch front page, couldn't find '.' in comic image source"
@@ -284,9 +284,9 @@ impl ComicUpdater {
284284
info!("Saving any changes to the database.");
285285
transaction.commit().await?;
286286

287-
Ok(comic_id
287+
comic_id
288288
.try_into()
289-
.map_err(|_| anyhow!("comic id extracted from front page is invalid"))?)
289+
.map_err(|_| anyhow!("comic id extracted from front page is invalid"))
290290
}
291291
}
292292

0 commit comments

Comments
 (0)