treewide: replace std hashers with rustc_hash alternatives; fix clippy
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I766c36cb53d3d7f9e85b91a67c4131a66a6a6964
This commit is contained in:
parent
0e79ba0518
commit
c6efd3661f
53 changed files with 343 additions and 394 deletions
|
|
@ -18,6 +18,7 @@ tracing-subscriber = { workspace = true }
|
|||
reqwest = { workspace = true }
|
||||
ratatui = { workspace = true }
|
||||
crossterm = { workspace = true }
|
||||
rustc-hash = { workspace = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use std::{collections::HashSet, time::Duration};
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::Result;
|
||||
use crossterm::{
|
||||
|
|
@ -6,6 +6,7 @@ use crossterm::{
|
|||
terminal::{self, EnterAlternateScreen, LeaveAlternateScreen},
|
||||
};
|
||||
use ratatui::{Terminal, backend::CrosstermBackend};
|
||||
use rustc_hash::FxHashSet;
|
||||
|
||||
use crate::{
|
||||
client::{
|
||||
|
|
@ -74,7 +75,7 @@ pub struct AppState {
|
|||
pub total_media_count: u64,
|
||||
pub server_url: String,
|
||||
// Multi-select support
|
||||
pub selected_items: HashSet<String>,
|
||||
pub selected_items: FxHashSet<String>,
|
||||
pub selection_mode: bool,
|
||||
pub pending_batch_delete: bool,
|
||||
// Duplicates view
|
||||
|
|
@ -178,7 +179,7 @@ impl AppState {
|
|||
total_media_count: 0,
|
||||
server_url: server_url.to_string(),
|
||||
// Multi-select
|
||||
selected_items: HashSet::new(),
|
||||
selected_items: FxHashSet::default(),
|
||||
selection_mode: false,
|
||||
pending_batch_delete: false,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use anyhow::Result;
|
||||
use reqwest::Client;
|
||||
use rustc_hash::FxHashMap;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone)]
|
||||
|
|
@ -28,7 +27,7 @@ pub struct MediaResponse {
|
|||
pub description: Option<String>,
|
||||
#[serde(default)]
|
||||
pub has_thumbnail: bool,
|
||||
pub custom_fields: HashMap<String, CustomFieldResponse>,
|
||||
pub custom_fields: FxHashMap<String, CustomFieldResponse>,
|
||||
pub created_at: String,
|
||||
pub updated_at: String,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue