Commit 5ad5070bed
5ad5070bedf4c7fd74250bcbf52b644c605d8f78
parent: 9c63221f6b
Unsigned
Siriusmart <sirius@siri.ws> · 2025-11-08 11:32 UTC
made clippy happy
Layout: unified · split
src/exit.rs
+1 −1
| @@ -16,7 +16,7 @@ use crate::{ |
| 16 | 16 | // - move thumbnails of videos in watch history to `~/.local/share/youtube-tui/watch_history/thumbnails` |
| 17 | 17 | // - remove `~/.cache` |
| 18 | 18 | pub fn exit(framework: &mut Framework) -> Result<(), Box<dyn Error>> { |
| 19 | | let mut limits = framework.data.global.remove::<MainConfig>().unwrap().limits; |
| 19 | let limits = framework.data.global.remove::<MainConfig>().unwrap().limits; |
| 20 | 20 | let mut watchhistory = framework.data.global.remove::<WatchHistory>().unwrap(); |
| 21 | 21 | watchhistory.trim(limits.watch_history); |
| 22 | 22 | // watchhistory.exit_move(); |
src/global/functions/run_command.rs
+1 −3
| @@ -4,12 +4,10 @@ use crate::{ |
| 4 | 4 | load_configs, |
| 5 | 5 | }; |
| 6 | 6 | use crossterm::event::{KeyEvent, KeyModifiers}; |
| 7 | | use home::home_dir; |
| 8 | 7 | use ratatui::{backend::CrosstermBackend, Terminal}; |
| 9 | 8 | use std::{ |
| 10 | 9 | env, |
| 11 | 10 | error::Error, |
| 12 | | fs, |
| 13 | 11 | io::Stdout, |
| 14 | 12 | process::{Command, Stdio}, |
| 15 | 13 | sync::Arc, |
| @@ -122,7 +120,7 @@ pub fn run_single_command( |
| 122 | 120 | // match a command splitted by space to a bunch of avaliable commands |
| 123 | 121 | match command { |
| 124 | 122 | [] => {} |
| 125 | | ["bookmark", id] => match (|| LocalStore::get_info(&id))() { |
| 123 | ["bookmark", id] => match LocalStore::get_info(id) { |
| 126 | 124 | Some(item) => { |
| 127 | 125 | let library = framework.data.global.get_mut::<Library>().unwrap(); |
| 128 | 126 | let _ = library.push(item); |
src/global/structs/localstore.rs
+1 −1
| @@ -12,7 +12,7 @@ static mut LOCALSTORE: OnceLock<LocalStore> = OnceLock::new(); |
| 12 | 12 | |
| 13 | 13 | pub struct LocalRecord { |
| 14 | 14 | item: Item, |
| 15 | | is_new: bool |
| 15 | is_new: bool, |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | /// cached access and write files to ~/.local/share |
src/items/itemlist.rs
−1
| @@ -5,7 +5,6 @@ use crate::{ |
| 5 | 5 | global::{functions::*, structs::*, traits::SearchProviderWrapper}, |
| 6 | 6 | items::ItemInfo, |
| 7 | 7 | }; |
| 8 | | use home::home_dir; |
| 9 | 8 | use ratatui::{ |
| 10 | 9 | layout::{Constraint, Rect}, |
| 11 | 10 | style::Style, |