mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-22 19:29:14 +03:00
fix nightly clippy
This commit is contained in:
parent
76814a36e3
commit
9c8c802b20
@ -148,12 +148,9 @@ impl ChangesComponent {
|
|||||||
|
|
||||||
fn dispatch_reset_workdir(&mut self) -> bool {
|
fn dispatch_reset_workdir(&mut self) -> bool {
|
||||||
if let Some(tree_item) = self.selection() {
|
if let Some(tree_item) = self.selection() {
|
||||||
let is_folder =
|
|
||||||
matches!(tree_item.kind, FileTreeItemKind::Path(_));
|
|
||||||
self.queue.push(InternalEvent::ConfirmAction(
|
self.queue.push(InternalEvent::ConfirmAction(
|
||||||
Action::Reset(ResetItem {
|
Action::Reset(ResetItem {
|
||||||
path: tree_item.info.full_path,
|
path: tree_item.info.full_path,
|
||||||
is_folder,
|
|
||||||
}),
|
}),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -617,7 +617,6 @@ impl DiffComponent {
|
|||||||
self.queue.push(InternalEvent::ConfirmAction(Action::Reset(
|
self.queue.push(InternalEvent::ConfirmAction(Action::Reset(
|
||||||
ResetItem {
|
ResetItem {
|
||||||
path: self.current.path.clone(),
|
path: self.current.path.clone(),
|
||||||
is_folder: false,
|
|
||||||
},
|
},
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
@ -100,11 +100,6 @@ impl RevisionFilesComponent {
|
|||||||
self.revision.as_ref()
|
self.revision.as_ref()
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
|
||||||
pub const fn selection(&self) -> Option<usize> {
|
|
||||||
self.tree.selection()
|
|
||||||
}
|
|
||||||
|
|
||||||
///
|
///
|
||||||
pub fn update(&mut self, ev: AsyncNotification) -> Result<()> {
|
pub fn update(&mut self, ev: AsyncNotification) -> Result<()> {
|
||||||
self.current_file.update(ev);
|
self.current_file.update(ev);
|
||||||
|
@ -18,15 +18,11 @@ use std::path::Path;
|
|||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct FileTreeOpen {
|
pub struct FileTreeOpen {
|
||||||
pub commit_id: CommitId,
|
pub commit_id: CommitId,
|
||||||
pub selection: Option<usize>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FileTreeOpen {
|
impl FileTreeOpen {
|
||||||
pub const fn new(commit_id: CommitId) -> Self {
|
pub const fn new(commit_id: CommitId) -> Self {
|
||||||
Self {
|
Self { commit_id }
|
||||||
commit_id,
|
|
||||||
selection: None,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +77,6 @@ impl RevisionFilesPopup {
|
|||||||
self.queue.push(InternalEvent::PopupStackPush(
|
self.queue.push(InternalEvent::PopupStackPush(
|
||||||
StackablePopupOpen::FileTree(FileTreeOpen {
|
StackablePopupOpen::FileTree(FileTreeOpen {
|
||||||
commit_id: revision.id,
|
commit_id: revision.id,
|
||||||
selection: self.files.selection(),
|
|
||||||
}),
|
}),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,6 @@ bitflags! {
|
|||||||
pub struct ResetItem {
|
pub struct ResetItem {
|
||||||
/// path to the item (folder/file)
|
/// path to the item (folder/file)
|
||||||
pub path: String,
|
pub path: String,
|
||||||
/// are talking about a folder here? otherwise it's a single file
|
|
||||||
pub is_folder: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user