reverted changes made to unrelated files

This commit is contained in:
junlu592 2025-12-01 18:29:58 +01:00
parent 9ff49ce111
commit 30d3ab1b9a
2 changed files with 6 additions and 3 deletions

View file

@ -59,8 +59,11 @@ pub enum BoolKey {
/// This is a workaround for old clients that used ints to represent boolean /// This is a workaround for old clients that used ints to represent boolean
/// values. For new config items, prefer using a bool directly. /// values. For new config items, prefer using a bool directly.
#[derive(Deserialize, Default)] #[derive(Deserialize, Default)]
struct BoolLike(
#[serde(deserialize_with = "deserialize_bool_from_anything")]
#[allow(dead_code)] #[allow(dead_code)]
struct BoolLike(#[serde(deserialize_with = "deserialize_bool_from_anything")] bool); bool,
);
impl Collection { impl Collection {
pub fn get_config_bool(&self, key: BoolKey) -> bool { pub fn get_config_bool(&self, key: BoolKey) -> bool {

View file

@ -161,7 +161,7 @@ impl Collection {
) -> Result<()> { ) -> Result<()> {
let ease_factor = u32::from( let ease_factor = u32::from(
card.memory_state card.memory_state
.map(|s| (s.difficulty_shifted() * 1000.) as u16) .map(|s| ((s.difficulty_shifted() * 1000.) as u16))
.unwrap_or(card.ease_factor), .unwrap_or(card.ease_factor),
); );
let entry = RevlogEntry { let entry = RevlogEntry {