Skip to content

Commit 8eaa4b9

Browse files
committed
fix: address clippy warnings
- Replace redundant closure with function reference in language_registry.rs - Add Default implementation for VersionCheckScreen All clippy warnings resolved.
1 parent 5871b6c commit 8eaa4b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+265
-227
lines changed

src/domain/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pub mod error;
22
pub mod models;
33
pub mod repositories;
4-
pub mod services;
4+
pub mod services;

src/domain/models/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ impl Default for ThemeConfig {
2424

2525
fn default_theme_id() -> String {
2626
"default".to_string()
27-
}
27+
}

src/domain/models/language.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ impl PartialEq for dyn Language {
5151
}
5252
}
5353

54-
impl Eq for dyn Language {}
54+
impl Eq for dyn Language {}

src/domain/models/storage/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
pub mod repository;
12
pub mod session;
23
pub mod stage;
3-
pub mod repository;
44

55
pub use repository::*;
66
pub use session::*;

src/domain/models/storage/repository.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ pub struct StoredRepositoryWithLanguages {
1313
pub repository_name: String,
1414
pub remote_url: String,
1515
pub languages: Vec<String>,
16-
}
16+
}

src/domain/models/storage/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ pub struct SaveStageParams<'a> {
102102
pub stage_result: &'a StageResult,
103103
pub keystrokes: usize,
104104
pub challenge: Option<&'a Challenge>,
105-
}
105+
}

src/domain/models/storage/stage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ pub struct DifficultyStats {
5050
pub avg_wpm: f64,
5151
pub avg_accuracy: f64,
5252
pub avg_score: f64,
53-
}
53+
}

src/domain/models/theme.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ impl Theme {
4444
THEME_FILES
4545
.iter()
4646
.map(|json| {
47-
let theme_file: ThemeFile = serde_json::from_str(json).expect("Failed to parse theme JSON");
47+
let theme_file: ThemeFile =
48+
serde_json::from_str(json).expect("Failed to parse theme JSON");
4849

4950
let light = ColorScheme::from_theme_file(&theme_file, &ColorMode::Light);
5051
let dark = ColorScheme::from_theme_file(&theme_file, &ColorMode::Dark);

src/domain/models/version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ pub struct VersionCacheEntry {
77
pub current_version: String,
88
pub update_available: bool,
99
pub last_checked: DateTime<Utc>,
10-
}
10+
}

src/domain/repositories/git_repository_repository.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
use crate::domain::models::storage::StoredRepository;
22
use crate::domain::models::GitRepository;
3-
use crate::infrastructure::storage::{
4-
daos::RepositoryDao,
5-
Database, HasDatabase,
6-
};
3+
use crate::infrastructure::storage::{daos::RepositoryDao, Database, HasDatabase};
74
use crate::Result;
85
use std::sync::{Arc, Mutex};
96

0 commit comments

Comments
 (0)