Skip to content

Commit 6ae497e

Browse files
committed
trailing comma and minor cleanup
1 parent 1c32834 commit 6ae497e

12 files changed

Lines changed: 18 additions & 19 deletions

File tree

filetreelist/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// #![forbid(missing_docs)]
21
#![forbid(unsafe_code)]
32
#![deny(
43
mismatched_lifetime_syntaxes,

src/app.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ impl Environment {
138138
use crossbeam_channel::unbounded;
139139
Self {
140140
queue: Queue::new(),
141-
theme: Default::default(),
142-
key_config: Default::default(),
143-
repo: RefCell::new(RepoPath::Path(Default::default())),
141+
theme: Rc::default(),
142+
key_config: Rc::default(),
143+
repo: RefCell::new(RepoPath::Path(PathBuf::default())),
144144
options: Rc::new(RefCell::new(Options::test_env())),
145145
sender_git: unbounded().0,
146146
sender_app: unbounded().0,
@@ -1097,7 +1097,7 @@ impl App {
10971097
Err(e) => {
10981098
log::error!("delete remote: {e:?}");
10991099
self.queue.push(InternalEvent::ShowErrorMsg(
1100-
format!("delete remote error:\n{e}",),
1100+
format!("delete remote error:\n{e}"),
11011101
));
11021102
}
11031103
}

src/components/status_tree.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use std::{borrow::Cow, cell::Cell, path::Path};
2222

2323
//TODO: use new `filetreelist` crate
2424

25-
///
25+
/// Renders the working-tree status as a tree.
2626
#[allow(clippy::struct_excessive_bools)]
2727
pub struct StatusTreeComponent {
2828
title: String,
@@ -208,7 +208,7 @@ impl StatusTreeComponent {
208208
w = width as usize
209209
)
210210
} else {
211-
format!(" {indent_str}{collapse_char}{string}",)
211+
format!(" {indent_str}{collapse_char}{string}")
212212
};
213213

214214
Some(Span::styled(

src/popups/commit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ impl CommitPopup {
446446
msg_source,
447447
&mut msg,
448448
)? {
449-
log::error!("prepare-commit-msg hook rejection: {e}",);
449+
log::error!("prepare-commit-msg hook rejection: {e}");
450450
}
451451
self.input.set_text(msg);
452452

src/popups/create_branch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl CreateBranchPopup {
131131
Err(e) => {
132132
log::error!("create branch: {e}");
133133
self.queue.push(InternalEvent::ShowErrorMsg(
134-
format!("create branch error:\n{e}",),
134+
format!("create branch error:\n{e}"),
135135
));
136136
}
137137
}

src/popups/create_remote.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl CreateRemotePopup {
202202
Err(e) => {
203203
log::error!("create remote: {e}");
204204
self.queue.push(InternalEvent::ShowErrorMsg(
205-
format!("create remote error:\n{e}",),
205+
format!("create remote error:\n{e}"),
206206
));
207207
}
208208
}

src/popups/log_search.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ impl LogSearchPopupPopup {
225225
),
226226
)]),
227227
Line::from(vec![Span::styled(
228-
format!("[{x_summary}] summary",),
228+
format!("[{x_summary}] summary"),
229229
self.theme.text(
230230
matches!(
231231
self.selection,
@@ -235,7 +235,7 @@ impl LogSearchPopupPopup {
235235
),
236236
)]),
237237
Line::from(vec![Span::styled(
238-
format!("[{x_body}] message body",),
238+
format!("[{x_body}] message body"),
239239
self.theme.text(
240240
matches!(
241241
self.selection,
@@ -245,7 +245,7 @@ impl LogSearchPopupPopup {
245245
),
246246
)]),
247247
Line::from(vec![Span::styled(
248-
format!("[{x_files}] committed files",),
248+
format!("[{x_files}] committed files"),
249249
self.theme.text(
250250
matches!(
251251
self.selection,
@@ -255,7 +255,7 @@ impl LogSearchPopupPopup {
255255
),
256256
)]),
257257
Line::from(vec![Span::styled(
258-
format!("[{x_authors}] authors",),
258+
format!("[{x_authors}] authors"),
259259
self.theme.text(
260260
matches!(
261261
self.selection,

src/popups/rename_branch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl RenameBranchPopup {
140140
Err(e) => {
141141
log::error!("create branch: {e}");
142142
self.queue.push(InternalEvent::ShowErrorMsg(
143-
format!("rename branch error:\n{e}",),
143+
format!("rename branch error:\n{e}"),
144144
));
145145
}
146146
}

src/popups/rename_remote.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ impl RenameRemotePopup {
163163
Err(e) => {
164164
log::error!("rename remote: {e}");
165165
self.queue.push(InternalEvent::ShowErrorMsg(
166-
format!("rename remote error:\n{e}",),
166+
format!("rename remote error:\n{e}"),
167167
));
168168
}
169169
}

src/popups/tag_commit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ impl TagCommitPopup {
196196

197197
log::error!("e: {e}");
198198
self.queue.push(InternalEvent::ShowErrorMsg(
199-
format!("tag error:\n{e}",),
199+
format!("tag error:\n{e}"),
200200
));
201201
}
202202
}

0 commit comments

Comments
 (0)