Reformat code

This commit is contained in:
micialware committed 2026-08-31 11:26:05 +03:00
1 parent 2fc58fcc2d
commit 29a90d48d9
8 files changed
+26 -33

No files matched your search

+5 -17
View File
@@ -9,6 +9,7 @@ use std::marker::PhantomData;
use std::time::Instant;
pub(crate) mod card_states;
pub mod custom_fields;
pub(crate) mod decks;
pub(crate) mod history;
pub(crate) mod import;
@@ -16,9 +17,8 @@ pub(crate) mod settings;
pub(crate) mod sqlite;
pub(crate) mod voice;
pub(crate) mod web_api;
pub(crate) mod words;
pub mod word_groups;
pub mod custom_fields;
pub(crate) mod words;
pub trait TableAccessQuerySet<T> {
fn load() -> &'static str;
@@ -44,11 +44,7 @@ impl<T: EntityData, Q: TableAccessQuerySet<T>> DbLayer<T> for SqliteDbLayer<T, Q
connection
.execute(Q::load(), Q::update_params(entity))
.map_err(|_| DbSaveError)?;
debug!(
"Updated in {} for {:?}",
Q::name(),
time.elapsed()
);
debug!("Updated in {} for {:?}", Q::name(), time.elapsed());
Ok(())
}
@@ -60,11 +56,7 @@ impl<T: EntityData, Q: TableAccessQuerySet<T>> DbLayer<T> for SqliteDbLayer<T, Q
.map_err(|_| DbSaveError)?;
entity.set_id(index.into());
debug!(
"Added into {} for {:?}",
Q::name(),
time.elapsed()
);
debug!("Added into {} for {:?}", Q::name(), time.elapsed());
Ok(())
}
@@ -80,11 +72,7 @@ impl<T: EntityData, Q: TableAccessQuerySet<T>> DbLayer<T> for SqliteDbLayer<T, Q
(&id,),
)
.map_err(|_| DbSaveError)?;
debug!(
"Deleted from {} for {:?}",
Q::name(),
time.elapsed()
);
debug!("Deleted from {} for {:?}", Q::name(), time.elapsed());
Ok(())
}