Skip to content

Commit 9c8c802

Browse files
committed
fix nightly clippy
1 parent 76814a3 commit 9c8c802

File tree

5 files changed

+1
-17
lines changed

5 files changed

+1
-17
lines changed

src/components/changes.rs

-3
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,9 @@ impl ChangesComponent {
148148

149149
fn dispatch_reset_workdir(&mut self) -> bool {
150150
if let Some(tree_item) = self.selection() {
151-
let is_folder =
152-
matches!(tree_item.kind, FileTreeItemKind::Path(_));
153151
self.queue.push(InternalEvent::ConfirmAction(
154152
Action::Reset(ResetItem {
155153
path: tree_item.info.full_path,
156-
is_folder,
157154
}),
158155
));
159156

src/components/diff.rs

-1
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,6 @@ impl DiffComponent {
617617
self.queue.push(InternalEvent::ConfirmAction(Action::Reset(
618618
ResetItem {
619619
path: self.current.path.clone(),
620-
is_folder: false,
621620
},
622621
)));
623622
}

src/components/revision_files.rs

-5
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,6 @@ impl RevisionFilesComponent {
100100
self.revision.as_ref()
101101
}
102102

103-
///
104-
pub const fn selection(&self) -> Option<usize> {
105-
self.tree.selection()
106-
}
107-
108103
///
109104
pub fn update(&mut self, ev: AsyncNotification) -> Result<()> {
110105
self.current_file.update(ev);

src/popups/revision_files.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,11 @@ use std::path::Path;
1818
#[derive(Clone, Debug)]
1919
pub struct FileTreeOpen {
2020
pub commit_id: CommitId,
21-
pub selection: Option<usize>,
2221
}
2322

2423
impl FileTreeOpen {
2524
pub const fn new(commit_id: CommitId) -> Self {
26-
Self {
27-
commit_id,
28-
selection: None,
29-
}
25+
Self { commit_id }
3026
}
3127
}
3228

@@ -81,7 +77,6 @@ impl RevisionFilesPopup {
8177
self.queue.push(InternalEvent::PopupStackPush(
8278
StackablePopupOpen::FileTree(FileTreeOpen {
8379
commit_id: revision.id,
84-
selection: self.files.selection(),
8580
}),
8681
));
8782
}

src/queue.rs

-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ bitflags! {
3535
pub struct ResetItem {
3636
/// path to the item (folder/file)
3737
pub path: String,
38-
/// are talking about a folder here? otherwise it's a single file
39-
pub is_folder: bool,
4038
}
4139

4240
///

0 commit comments

Comments
 (0)