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::{
1616// - move thumbnails of videos in watch history to `~/.local/share/youtube-tui/watch_history/thumbnails`
1717// - remove `~/.cache`
1818pub 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;
2020 let mut watchhistory = framework.data.global.remove::<WatchHistory>().unwrap();
2121 watchhistory.trim(limits.watch_history);
2222 // watchhistory.exit_move();
src/global/functions/run_command.rs +1 −3
@@ -4,12 +4,10 @@ use crate::{
44 load_configs,
55};
66use crossterm::event::{KeyEvent, KeyModifiers};
7use home::home_dir;
87use ratatui::{backend::CrosstermBackend, Terminal};
98use std::{
109 env,
1110 error::Error,
12 fs,
1311 io::Stdout,
1412 process::{Command, Stdio},
1513 sync::Arc,
@@ -122,7 +120,7 @@ pub fn run_single_command(
122120 // match a command splitted by space to a bunch of avaliable commands
123121 match command {
124122 [] => {}
125 ["bookmark", id] => match (|| LocalStore::get_info(&id))() {
123 ["bookmark", id] => match LocalStore::get_info(id) {
126124 Some(item) => {
127125 let library = framework.data.global.get_mut::<Library>().unwrap();
128126 let _ = library.push(item);
src/global/structs/localstore.rs +1 −1
@@ -12,7 +12,7 @@ static mut LOCALSTORE: OnceLock<LocalStore> = OnceLock::new();
1212
1313pub struct LocalRecord {
1414 item: Item,
15 is_new: bool
15 is_new: bool,
1616}
1717
1818/// cached access and write files to ~/.local/share
src/items/itemlist.rs −1
@@ -5,7 +5,6 @@ use crate::{
55 global::{functions::*, structs::*, traits::SearchProviderWrapper},
66 items::ItemInfo,
77};
8use home::home_dir;
98use ratatui::{
109 layout::{Constraint, Rect},
1110 style::Style,