diff options
| author | Aram Drevekenin <aram@poor.dev> | 2025-08-01 15:17:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-01 15:17:44 +0200 |
| commit | b5a893f36a5a466b8bce6f24fd1e3a556e1e46ae (patch) | |
| tree | bbc2e47c73a9ac5db221ae7d311c64b8c3cbccaf /default-plugins | |
| parent | docs(about): release notes for version 0.43.0 (#4326) (diff) | |
| download | sl0ppij-b5a893f36a5a466b8bce6f24fd1e3a556e1e46ae.tar.gz sl0ppij-b5a893f36a5a466b8bce6f24fd1e3a556e1e46ae.tar.xz sl0ppij-b5a893f36a5a466b8bce6f24fd1e3a556e1e46ae.zip | |
style: some cleanups (#4329)
* style: some cleanups
* style(fmt): rustfmt
Diffstat (limited to 'default-plugins')
| -rw-r--r-- | default-plugins/compact-bar/src/main.rs | 1 | ||||
| -rw-r--r-- | default-plugins/fixture-plugin-for-tests/src/main.rs | 2 | ||||
| -rw-r--r-- | default-plugins/status-bar/src/main.rs | 4 | ||||
| -rw-r--r-- | default-plugins/status-bar/src/second_line.rs | 4 | ||||
| -rw-r--r-- | default-plugins/strider/src/file_list_view.rs | 28 | ||||
| -rw-r--r-- | default-plugins/strider/src/main.rs | 3 | ||||
| -rw-r--r-- | default-plugins/strider/src/state.rs | 2 |
7 files changed, 6 insertions, 38 deletions
diff --git a/default-plugins/compact-bar/src/main.rs b/default-plugins/compact-bar/src/main.rs index 6342b6be..b07559e2 100644 --- a/default-plugins/compact-bar/src/main.rs +++ b/default-plugins/compact-bar/src/main.rs @@ -378,6 +378,7 @@ impl State { // Tooltip operations fn toggle_persisted_tooltip(&self, new_mode: InputMode) { + #[allow(unused_variables)] let message = self .create_tooltip_message(MSG_TOGGLE_PERSISTED_TOOLTIP, new_mode) .with_args(self.create_persist_args()); diff --git a/default-plugins/fixture-plugin-for-tests/src/main.rs b/default-plugins/fixture-plugin-for-tests/src/main.rs index 47e1295a..8ca23557 100644 --- a/default-plugins/fixture-plugin-for-tests/src/main.rs +++ b/default-plugins/fixture-plugin-for-tests/src/main.rs @@ -1,5 +1,6 @@ use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; +#[allow(unused_imports)] use std::io::prelude::*; use zellij_tile::prelude::*; @@ -7,6 +8,7 @@ use zellij_tile::prelude::*; // it is not (and should not!) be included in the mainline executable // it's included here for convenience so that it will be built by the CI +#[allow(dead_code)] #[derive(Default)] struct State { received_events: Vec<Event>, diff --git a/default-plugins/status-bar/src/main.rs b/default-plugins/status-bar/src/main.rs index 5bc54da0..0c1b9c88 100644 --- a/default-plugins/status-bar/src/main.rs +++ b/default-plugins/status-bar/src/main.rs @@ -700,10 +700,6 @@ pub mod tests { ); } - fn get_palette() -> Palette { - Palette::default() - } - #[test] fn style_key_with_modifier_only_chars() { let keyvec = vec![ diff --git a/default-plugins/status-bar/src/second_line.rs b/default-plugins/status-bar/src/second_line.rs index 82ffe4b1..b5ba8292 100644 --- a/default-plugins/status-bar/src/second_line.rs +++ b/default-plugins/status-bar/src/second_line.rs @@ -531,10 +531,6 @@ mod tests { string.to_string() } - fn get_palette() -> Palette { - Palette::default() - } - #[test] fn full_length_shortcut_with_key() { let keyvec = vec![KeyWithModifier::new(BareKey::Char('a'))]; diff --git a/default-plugins/strider/src/file_list_view.rs b/default-plugins/strider/src/file_list_view.rs index a5a0bfa9..2226e618 100644 --- a/default-plugins/strider/src/file_list_view.rs +++ b/default-plugins/strider/src/file_list_view.rs @@ -1,8 +1,8 @@ use crate::shared::{calculate_list_bounds, render_list_tip}; -use crate::state::{refresh_directory, ROOT}; +use crate::state::refresh_directory; use pretty_bytes::converter::convert as pretty_bytes; use std::collections::HashMap; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; use unicode_width::UnicodeWidthStr; use zellij_tile::prelude::*; @@ -58,17 +58,6 @@ impl FileListView { self.cursor_hist.remove(&self.path); } - pub fn get_relative_path(&self) -> PathBuf { - if let Some(initial_cwd_part) = self.path.iter().next() { - self.path - .strip_prefix(initial_cwd_part) - .unwrap_or(&self.path) - .to_path_buf() - } else { - PathBuf::new() - } - } - pub fn update_files( &mut self, paths: Vec<(PathBuf, Option<FileMetadata>)>, @@ -193,19 +182,6 @@ impl FsEntry { } } - pub fn get_pathbuf_without_root_prefix(&self) -> PathBuf { - match self { - FsEntry::Dir(p) => p - .strip_prefix(ROOT) - .map(|p| p.to_path_buf()) - .unwrap_or_else(|_| p.clone()), - FsEntry::File(p, _) => p - .strip_prefix(ROOT) - .map(|p| p.to_path_buf()) - .unwrap_or_else(|_| p.clone()), - } - } - pub fn get_full_pathbuf(&self) -> PathBuf { match self { FsEntry::Dir(p) => p.clone(), diff --git a/default-plugins/strider/src/main.rs b/default-plugins/strider/src/main.rs index d770e495..8870232f 100644 --- a/default-plugins/strider/src/main.rs +++ b/default-plugins/strider/src/main.rs @@ -3,7 +3,6 @@ mod search_view; mod shared; mod state; -use crate::file_list_view::FsEntry; use shared::{render_current_path, render_instruction_line, render_search_term}; use state::{refresh_directory, State}; use std::collections::BTreeMap; @@ -58,7 +57,7 @@ impl ZellijPlugin for State { self.update_files(paths); should_render = true; }, - Event::HostFolderChanged(new_host_folder) => { + Event::HostFolderChanged(_new_host_folder) => { scan_host_folder(&"/host"); should_render = true; }, diff --git a/default-plugins/strider/src/state.rs b/default-plugins/strider/src/state.rs index 93c6cf1b..2ad996f1 100644 --- a/default-plugins/strider/src/state.rs +++ b/default-plugins/strider/src/state.rs @@ -7,8 +7,6 @@ use std::{ }; use zellij_tile::prelude::*; -pub const ROOT: &str = "/host"; - #[derive(Default)] pub struct State { pub file_list_view: FileListView, |
