From c3951076fc1c0289b71c89ddb0796fae7ad87bf2 Mon Sep 17 00:00:00 2001 From: Abdo Date: Tue, 9 Dec 2025 14:32:18 +0300 Subject: [PATCH] Fix clippy errors --- rslib/src/config/bool.rs | 11 ----------- rslib/src/revlog/mod.rs | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/rslib/src/config/bool.rs b/rslib/src/config/bool.rs index c76787cb0..1be9b2556 100644 --- a/rslib/src/config/bool.rs +++ b/rslib/src/config/bool.rs @@ -1,8 +1,6 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -use serde::Deserialize; -use serde_aux::field_attributes::deserialize_bool_from_anything; use strum::IntoStaticStr; use crate::prelude::*; @@ -56,15 +54,6 @@ pub enum BoolKey { AddingDefaultsToCurrentDeck, } -/// This is a workaround for old clients that used ints to represent boolean -/// values. For new config items, prefer using a bool directly. -#[derive(Deserialize, Default)] -struct BoolLike( - #[serde(deserialize_with = "deserialize_bool_from_anything")] - #[allow(dead_code)] - bool, -); - impl Collection { pub fn get_config_bool(&self, key: BoolKey) -> bool { match key { diff --git a/rslib/src/revlog/mod.rs b/rslib/src/revlog/mod.rs index fbb9b459a..3e22890b1 100644 --- a/rslib/src/revlog/mod.rs +++ b/rslib/src/revlog/mod.rs @@ -161,7 +161,7 @@ impl Collection { ) -> Result<()> { let ease_factor = u32::from( card.memory_state - .map(|s| ((s.difficulty_shifted() * 1000.) as u16)) + .map(|s| (s.difficulty_shifted() * 1000.) as u16) .unwrap_or(card.ease_factor), ); let entry = RevlogEntry {