Skip to content

Commit a4ca16e

Browse files
committed
version 1.56.2
1 parent 2f4956f commit a4ca16e

16 files changed

Lines changed: 37 additions & 37 deletions

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
### next
1+
### v1.56.2 - 2026-03-26
2+
<a name="v1.56.2"></a>
3+
- `{file-root-relative}` argument - Fix #1142
24
- fix `:clear_stage` (or other operations closing the stage panel) often closing broot - Fix #1143
35

46
### v1.56.1 - 2026-03-20

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "broot"
3-
version = "1.56.1"
3+
version = "1.56.2"
44
authors = ["dystroy <denys.seguret@gmail.com>"]
55
repository = "https://github.com/Canop/broot"
66
homepage = "https://dystroy.org/broot"

bacon.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ command = [
104104
"-A", "clippy::wildcard_imports",
105105
"-A", "clippy::vec_init_then_push",
106106
"-A", "clippy::single_match_else",
107+
"-A", "clippy::return_self_not_must_use",
107108
]
108109
need_stdout = false
109110

src/hex/hex_view.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl HexView {
132132
const MIN: i32 = 1 // margin
133133
+ 32 // 32 hex
134134
+ 1; // scrollbar
135-
let mut rem = area.width as i32 - MIN;
135+
let mut rem = i32::from(area.width) - MIN;
136136
if rem > 17 {
137137
chars = true;
138138
rem -= 17;

src/icon/font.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ impl FontPlugin {
8181

8282
fn handle_single_extension(
8383
&self,
84-
ext: Option<String>,
84+
ext: Option<&str>,
8585
) -> &'static str {
8686
match ext {
8787
None => "default_file",
88-
Some(ref e) => match self.extension_to_icon_name_map.get(e as &str) {
88+
Some(e) => match self.extension_to_icon_name_map.get(e as &str) {
8989
None => "default_file",
9090
Some(icon_name) => icon_name,
9191
},
@@ -100,18 +100,18 @@ impl FontPlugin {
100100
) -> &'static str {
101101
match self.file_name_to_icon_name_map.get(name) {
102102
Some(icon_name) => icon_name,
103-
_ => self.handle_double_extension(double_ext, ext),
103+
_ => self.handle_double_extension(double_ext.as_deref(), ext.as_deref()),
104104
}
105105
}
106106

107107
fn handle_double_extension(
108108
&self,
109-
double_ext: Option<String>,
110-
ext: Option<String>,
109+
double_ext: Option<&str>,
110+
ext: Option<&str>,
111111
) -> &'static str {
112112
match double_ext {
113113
None => self.handle_single_extension(ext),
114-
Some(ref de) => match self.double_extension_to_icon_name_map.get(de as &str) {
114+
Some(de) => match self.double_extension_to_icon_name_map.get(de as &str) {
115115
None => self.handle_single_extension(ext),
116116
Some(icon_name) => icon_name,
117117
},

src/path/special_path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,6 @@ impl SpecialPath {
126126
path: &Path,
127127
) -> bool {
128128
path.to_str()
129-
.map_or(false, |p| self.pattern.as_str().starts_with(p))
129+
.is_some_and(|p| self.pattern.as_str().starts_with(p))
130130
}
131131
}

src/pattern/composite_pattern.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub struct CompositePattern {
1515

1616
impl CompositePattern {
1717
pub fn new(expr: BeTree<PatternOperator, Pattern>) -> Self {
18-
let content_search = expr.iter_atoms().any(|p| p.is_content_search());
18+
let content_search = expr.iter_atoms().any(Pattern::is_content_search);
1919
Self {
2020
expr,
2121
content_search,
@@ -160,7 +160,7 @@ impl CompositePattern {
160160
// We can't generate a content match for a whole file
161161
// content, so we build one of length 0.
162162
Some(ContentMatch {
163-
extract: "".to_string(),
163+
extract: String::new(),
164164
needle_start: 0,
165165
needle_end: 0,
166166
})
@@ -274,7 +274,7 @@ impl CompositePattern {
274274
}
275275

276276
pub fn is_empty(&self) -> bool {
277-
let is_not_empty = self.expr.iter_atoms().any(|p| p.is_some());
277+
let is_not_empty = self.expr.iter_atoms().any(Pattern::is_some);
278278
!is_not_empty
279279
}
280280
}

src/pattern/content_pattern.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl ContentExactPattern {
4141
}
4242

4343
pub fn to_regex_parts(&self) -> (String, String) {
44-
(regex::escape(self.as_str()), "".to_string())
44+
(regex::escape(self.as_str()), String::new())
4545
}
4646

4747
pub fn score_of(

src/pattern/exact_pattern.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl ExactPattern {
103103
}
104104

105105
/// get the line of the first match, if any
106-
/// (not used today, we use content_pattern to search in files)
106+
/// (not used today, we use `content_pattern` to search in files)
107107
pub fn try_get_match_line_count(
108108
&self,
109109
path: &Path,
@@ -120,7 +120,7 @@ impl ExactPattern {
120120
}
121121

122122
/// get the line of the first match, if any
123-
/// (not used today, we use content_pattern to search in files)
123+
/// (not used today, we use `content_pattern` to search in files)
124124
pub fn get_match_line_count(
125125
&self,
126126
path: &Path,

0 commit comments

Comments
 (0)