aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2025-08-01 15:17:44 +0200
committerGitHub <noreply@github.com>2025-08-01 15:17:44 +0200
commitb5a893f36a5a466b8bce6f24fd1e3a556e1e46ae (patch)
treebbc2e47c73a9ac5db221ae7d311c64b8c3cbccaf
parentdocs(about): release notes for version 0.43.0 (#4326) (diff)
downloadsl0ppij-b5a893f36a5a466b8bce6f24fd1e3a556e1e46ae.tar.gz
sl0ppij-b5a893f36a5a466b8bce6f24fd1e3a556e1e46ae.tar.xz
sl0ppij-b5a893f36a5a466b8bce6f24fd1e3a556e1e46ae.zip
style: some cleanups (#4329)
* style: some cleanups * style(fmt): rustfmt
-rw-r--r--default-plugins/compact-bar/src/main.rs1
-rw-r--r--default-plugins/fixture-plugin-for-tests/src/main.rs2
-rw-r--r--default-plugins/status-bar/src/main.rs4
-rw-r--r--default-plugins/status-bar/src/second_line.rs4
-rw-r--r--default-plugins/strider/src/file_list_view.rs28
-rw-r--r--default-plugins/strider/src/main.rs3
-rw-r--r--default-plugins/strider/src/state.rs2
-rw-r--r--zellij-client/src/lib.rs5
-rw-r--r--zellij-client/src/web_client/mod.rs1
-rw-r--r--zellij-server/src/panes/grid.rs1
-rw-r--r--zellij-server/src/tab/mod.rs4
-rw-r--r--zellij-utils/src/setup.rs1
12 files changed, 12 insertions, 44 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,
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<String>,
invoked_with: Option<Run>,
- start_suppressed: bool,
- should_focus_pane: bool,
pane_id_to_replace: Option<PaneId>,
close_replaced_pane: bool,
client_id: Option<ClientId>,
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::{