From c33a60f1309c8123a08d1db5f6db53169adf4145 Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Sat, 30 Mar 2024 01:29:43 +0100 Subject: [PATCH] fix clippy Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com> --- crates/storage/src/entity/activities.rs | 2 +- crates/storage/src/storage/sqlite.rs | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/crates/storage/src/entity/activities.rs b/crates/storage/src/entity/activities.rs index 0dbb2dc..7d41e99 100644 --- a/crates/storage/src/entity/activities.rs +++ b/crates/storage/src/entity/activities.rs @@ -1,8 +1,8 @@ +#![allow(unused_qualifications)] //! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15 use chrono::{DateTime, FixedOffset}; use sea_orm::entity::prelude::*; - #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "activities")] pub struct Model { diff --git a/crates/storage/src/storage/sqlite.rs b/crates/storage/src/storage/sqlite.rs index ea82ea4..55bc61a 100644 --- a/crates/storage/src/storage/sqlite.rs +++ b/crates/storage/src/storage/sqlite.rs @@ -1,8 +1,7 @@ use std::{collections::BTreeMap, fs::File, path::PathBuf}; -use itertools::Itertools; -use sea_orm::{Database, DatabaseConnection, EntityTrait, ModelTrait, QueryFilter}; -use tokio::runtime::Runtime; +// use itertools::Itertools; +use sea_orm::{Database, DatabaseConnection, EntityTrait, ModelTrait}; use tracing::debug; use pace_core::{ @@ -20,7 +19,7 @@ use pace_error::{DatabaseStorageErrorKind, PaceOptResult, PaceResult}; use pace_time::{date::PaceDate, duration::PaceDurationRange, time_range::TimeRangeOptions}; use crate::{ - entity::{activities, activity_status, descriptions, prelude::Activities, tags}, + entity::{descriptions, prelude::Activities}, migration::{Migrator, MigratorTrait}, runtime, }; @@ -124,12 +123,14 @@ impl ActivityReadOps for DatabaseActivityStorage { .into()); }; - let description = activity + let _description = activity .find_related(descriptions::Entity) .one(&self.connection) .await; - Ok(ActivityItem::default()) + todo!("implement read_activity for sqlite"); + + // Ok(ActivityItem::default()) }) }