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, 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)>, @@ -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, diff --git a/zellij-client/src/lib.rs b/zellij-client/src/lib.rs index 60245f94..0f326f8f 100644 --- a/zellij-client/src/lib.rs +++ b/zellij-client/src/lib.rs @@ -59,8 +59,11 @@ pub(crate) enum ClientInstruction { UnblockCliPipeInput(()), // String -> pipe name CliPipeOutput((), ()), // String -> pipe name, String -> output QueryTerminalSize, - WriteConfigToDisk { config: String }, + WriteConfigToDisk { + config: String, + }, StartWebServer, + #[allow(dead_code)] // we need the session name here even though we're not currently using it RenamedSession(String), // String -> new session name } diff --git a/zellij-client/src/web_client/mod.rs b/zellij-client/src/web_client/mod.rs index c85caf18..a6fe4765 100644 --- a/zellij-client/src/web_client/mod.rs +++ b/zellij-client/src/web_client/mod.rs @@ -171,6 +171,7 @@ pub fn start_web_client( )); } +#[allow(dead_code)] async fn listen_to_config_file_changes(config_file_path: PathBuf, instance_id: &str) { let socket_path = WEBSERVER_SOCKET_PATH.join(instance_id); diff --git a/zellij-server/src/panes/grid.rs b/zellij-server/src/panes/grid.rs index c60bcbc1..e9098849 100644 --- a/zellij-server/src/panes/grid.rs +++ b/zellij-server/src/panes/grid.rs @@ -1,5 +1,4 @@ use super::sixel::{PixelRect, SixelGrid, SixelImageStore}; -use regex::Regex; use std::borrow::Cow; use std::cell::RefCell; use std::collections::HashMap; diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs index b6eadc14..97714aca 100644 --- a/zellij-server/src/tab/mod.rs +++ b/zellij-server/src/tab/mod.rs @@ -1313,8 +1313,6 @@ impl Tab { pid, initial_pane_title, invoked_with, - start_suppressed, - should_focus_pane, pane_id_to_replace, close_replaced_pane, client_id, @@ -1615,8 +1613,6 @@ impl Tab { pid: PaneId, initial_pane_title: Option, invoked_with: Option, - start_suppressed: bool, - should_focus_pane: bool, pane_id_to_replace: Option, close_replaced_pane: bool, client_id: Option, diff --git a/zellij-utils/src/setup.rs b/zellij-utils/src/setup.rs index 15f54c49..0093cbfa 100644 --- a/zellij-utils/src/setup.rs +++ b/zellij-utils/src/setup.rs @@ -1,6 +1,7 @@ #[cfg(not(target_family = "wasm"))] use crate::consts::ASSET_MAP; use crate::input::theme::Themes; +#[allow(unused_imports)] use crate::{ cli::{CliArgs, Command, SessionCommand, Sessions}, consts::{