fix nightly clippy

This commit is contained in:
extrawurst 2022-07-02 08:17:15 +02:00
parent ad0ec7e9b8
commit c1cb868c4b
26 changed files with 36 additions and 36 deletions

View file

@ -14,7 +14,7 @@ use std::{
}; };
/// ///
#[derive(Hash, Clone, PartialEq)] #[derive(Hash, Clone, PartialEq, Eq)]
pub struct BlameParams { pub struct BlameParams {
/// path to the file to blame /// path to the file to blame
pub file_path: String, pub file_path: String,

View file

@ -13,7 +13,7 @@ type ResultType = Vec<StatusItem>;
struct Request<R, A>(R, A); struct Request<R, A>(R, A);
/// ///
#[derive(Debug, Copy, Clone, PartialEq)] #[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct CommitFilesParams { pub struct CommitFilesParams {
/// ///
pub id: CommitId, pub id: CommitId,

View file

@ -14,7 +14,7 @@ use std::{
}; };
/// ///
#[derive(Debug, Hash, Clone, PartialEq)] #[derive(Debug, Hash, Clone, PartialEq, Eq)]
pub enum DiffType { pub enum DiffType {
/// diff two commits /// diff two commits
Commits((CommitId, CommitId)), Commits((CommitId, CommitId)),
@ -27,7 +27,7 @@ pub enum DiffType {
} }
/// ///
#[derive(Debug, Hash, Clone, PartialEq)] #[derive(Debug, Hash, Clone, PartialEq, Eq)]
pub struct DiffParams { pub struct DiffParams {
/// path to the file to diff /// path to the file to diff
pub path: String, pub path: String,

View file

@ -67,7 +67,7 @@ use std::{
}; };
/// this type is used to communicate events back through the channel /// this type is used to communicate events back through the channel
#[derive(Copy, Clone, Debug, PartialEq)] #[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum AsyncGitNotification { pub enum AsyncGitNotification {
/// this indicates that no new state was fetched but that a async process finished /// this indicates that no new state was fetched but that a async process finished
FinishUnchanged, FinishUnchanged,

View file

@ -4,7 +4,7 @@ use easy_cast::{Conv, ConvFloat};
use std::cmp; use std::cmp;
/// ///
#[derive(Clone, Copy, Default, Debug, PartialEq)] #[derive(Clone, Copy, Default, Debug, PartialEq, Eq)]
pub struct ProgressPercent { pub struct ProgressPercent {
/// percent 0..100 /// percent 0..100
pub progress: u8, pub progress: u8,

View file

@ -15,7 +15,7 @@ use std::{
}; };
/// ///
#[derive(PartialEq)] #[derive(PartialEq, Eq)]
pub enum FetchStatus { pub enum FetchStatus {
/// previous fetch still running /// previous fetch still running
Pending, Pending,

View file

@ -29,7 +29,7 @@ pub struct Status {
} }
/// ///
#[derive(Default, Hash, Copy, Clone, PartialEq)] #[derive(Default, Hash, Copy, Clone, PartialEq, Eq)]
pub struct StatusParams { pub struct StatusParams {
tick: u128, tick: u128,
status_type: StatusType, status_type: StatusType,

View file

@ -4,7 +4,7 @@ use git2::Signature;
use scopetime::scope_time; use scopetime::scope_time;
/// ///
#[derive(Debug, PartialEq, Default, Clone)] #[derive(Debug, PartialEq, Eq, Default, Clone)]
pub struct CommitSignature { pub struct CommitSignature {
/// ///
pub name: String, pub name: String,

View file

@ -6,7 +6,7 @@ use super::{repository::repo, RepoPath};
// see https://git-scm.com/docs/git-config#Documentation/git-config.txt-statusshowUntrackedFiles // see https://git-scm.com/docs/git-config#Documentation/git-config.txt-statusshowUntrackedFiles
/// represents the `status.showUntrackedFiles` git config state /// represents the `status.showUntrackedFiles` git config state
#[derive(Hash, Copy, Clone, PartialEq)] #[derive(Hash, Copy, Clone, PartialEq, Eq)]
pub enum ShowUntrackedFilesConfig { pub enum ShowUntrackedFilesConfig {
/// ///
No, No,

View file

@ -7,7 +7,7 @@ use crate::error::{Error, Result};
use git2::CredentialHelper; use git2::CredentialHelper;
/// basic Authentication Credentials /// basic Authentication Credentials
#[derive(Debug, Clone, Default, PartialEq)] #[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct BasicAuthCredential { pub struct BasicAuthCredential {
/// ///
pub username: Option<String>, pub username: Option<String>,

View file

@ -16,7 +16,7 @@ use scopetime::scope_time;
use std::{cell::RefCell, fs, path::Path, rc::Rc}; use std::{cell::RefCell, fs, path::Path, rc::Rc};
/// type of diff of a single line /// type of diff of a single line
#[derive(Copy, Clone, PartialEq, Hash, Debug)] #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
pub enum DiffLineType { pub enum DiffLineType {
/// just surrounding line, no change /// just surrounding line, no change
None, None,
@ -127,7 +127,7 @@ pub struct FileDiff {
} }
/// see <https://libgit2.org/libgit2/#HEAD/type/git_diff_options> /// see <https://libgit2.org/libgit2/#HEAD/type/git_diff_options>
#[derive(Debug, Hash, Clone, Copy, PartialEq)] #[derive(Debug, Hash, Clone, Copy, PartialEq, Eq)]
pub struct DiffOptions { pub struct DiffOptions {
/// see <https://libgit2.org/libgit2/#HEAD/type/git_diff_options> /// see <https://libgit2.org/libgit2/#HEAD/type/git_diff_options>
pub ignore_whitespace: bool, pub ignore_whitespace: bool,

View file

@ -153,7 +153,7 @@ pub fn hooks_post_commit(repo_path: &RepoPath) -> Result<HookResult> {
} }
/// ///
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq, Eq)]
pub enum HookResult { pub enum HookResult {
/// Everything went fine /// Everything went fine
Ok, Ok,

View file

@ -69,7 +69,7 @@ pub fn conflict_free_rebase(
} }
/// ///
#[derive(PartialEq, Debug)] #[derive(PartialEq, Eq, Debug)]
pub enum RebaseState { pub enum RebaseState {
/// ///
Finished, Finished,
@ -144,7 +144,7 @@ pub fn continue_rebase(
} }
/// ///
#[derive(PartialEq, Debug)] #[derive(PartialEq, Eq, Debug)]
pub struct RebaseProgress { pub struct RebaseProgress {
/// ///
pub steps: usize, pub steps: usize,

View file

@ -22,7 +22,7 @@ pub trait AsyncProgress: Clone + Send + Sync {
} }
/// ///
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq)]
pub enum ProgressNotification { pub enum ProgressNotification {
/// ///
UpdateTips { UpdateTips {

View file

@ -17,7 +17,7 @@ use scopetime::scope_time;
use std::collections::HashSet; use std::collections::HashSet;
/// ///
#[derive(Debug, Copy, Clone, PartialEq)] #[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum PushTagsProgress { pub enum PushTagsProgress {
/// fetching tags from remote to check which local tags need pushing /// fetching tags from remote to check which local tags need pushing
CheckRemote, CheckRemote,

View file

@ -4,7 +4,7 @@ use git2::RepositoryState;
use scopetime::scope_time; use scopetime::scope_time;
/// ///
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq, Eq)]
pub enum RepoState { pub enum RepoState {
/// ///
Clean, Clean,

View file

@ -12,7 +12,7 @@ use std::path::Path;
use super::{RepoPath, ShowUntrackedFilesConfig}; use super::{RepoPath, ShowUntrackedFilesConfig};
/// ///
#[derive(Copy, Clone, Hash, PartialEq, Debug)] #[derive(Copy, Clone, Hash, PartialEq, Eq, Debug)]
pub enum StatusItemType { pub enum StatusItemType {
/// ///
New, New,
@ -59,7 +59,7 @@ impl From<Delta> for StatusItemType {
} }
/// ///
#[derive(Clone, Hash, PartialEq, Debug)] #[derive(Clone, Hash, PartialEq, Eq, Debug)]
pub struct StatusItem { pub struct StatusItem {
/// ///
pub path: String, pub path: String,
@ -68,7 +68,7 @@ pub struct StatusItem {
} }
/// ///
#[derive(Copy, Clone, Hash, PartialEq, Debug)] #[derive(Copy, Clone, Hash, PartialEq, Eq, Debug)]
pub enum StatusType { pub enum StatusType {
/// ///
WorkingDir, WorkingDir,

View file

@ -10,7 +10,7 @@ use std::{
}; };
/// ///
#[derive(Clone, Hash, PartialEq, Debug)] #[derive(Clone, Hash, PartialEq, Eq, Debug)]
pub struct Tag { pub struct Tag {
/// tag name /// tag name
pub name: String, pub name: String,

View file

@ -11,7 +11,7 @@ use std::{
}; };
/// `tree_files` returns a list of `FileTree` /// `tree_files` returns a list of `FileTree`
#[derive(Debug, PartialEq, Clone)] #[derive(Debug, PartialEq, Eq, Clone)]
pub struct TreeFile { pub struct TreeFile {
/// path of this file /// path of this file
pub path: PathBuf, pub path: PathBuf,

View file

@ -16,7 +16,7 @@ use std::{
}; };
/// ///
#[derive(PartialEq, Debug, Clone)] #[derive(PartialEq, Eq, Debug, Clone)]
pub struct Head { pub struct Head {
/// ///
pub name: String, pub name: String,

View file

@ -83,11 +83,11 @@ impl TreeItemInfo {
} }
/// attribute used to indicate the collapse/expand state of a path item /// attribute used to indicate the collapse/expand state of a path item
#[derive(PartialEq, Debug, Copy, Clone)] #[derive(PartialEq, Eq, Debug, Copy, Clone)]
pub struct PathCollapsed(pub bool); pub struct PathCollapsed(pub bool);
/// `FileTreeItem` can be of two kinds /// `FileTreeItem` can be of two kinds
#[derive(PartialEq, Debug, Clone)] #[derive(PartialEq, Eq, Debug, Clone)]
pub enum FileTreeItemKind { pub enum FileTreeItemKind {
Path(PathCollapsed), Path(PathCollapsed),
File, File,

View file

@ -192,7 +192,7 @@ pub enum Direction {
} }
/// ///
#[derive(PartialEq)] #[derive(PartialEq, Eq)]
pub enum CommandBlocking { pub enum CommandBlocking {
Blocking, Blocking,
PassingOn, PassingOn,
@ -220,7 +220,7 @@ pub trait DrawableComponent {
} }
/// ///
#[derive(PartialEq)] #[derive(PartialEq, Eq)]
pub enum EventState { pub enum EventState {
Consumed, Consumed,
NotConsumed, NotConsumed,

View file

@ -23,7 +23,7 @@ use tui::{
Frame, Frame,
}; };
#[derive(Clone, Copy, PartialEq)] #[derive(Clone, Copy, PartialEq, Eq)]
pub enum AppOption { pub enum AppOption {
StatusShowUntracked, StatusShowUntracked,
DiffIgnoreWhitespaces, DiffIgnoreWhitespaces,

View file

@ -22,7 +22,7 @@ use tui::{
Frame, Frame,
}; };
#[derive(PartialEq)] #[derive(PartialEq, Eq)]
pub enum InputType { pub enum InputType {
Singleline, Singleline,
Multiline, Multiline,

View file

@ -39,11 +39,11 @@ impl TreeItemInfo {
} }
/// attribute used to indicate the collapse/expand state of a path item /// attribute used to indicate the collapse/expand state of a path item
#[derive(PartialEq, Debug, Copy, Clone)] #[derive(PartialEq, Eq, Debug, Copy, Clone)]
pub struct PathCollapsed(pub bool); pub struct PathCollapsed(pub bool);
/// `FileTreeItem` can be of two kinds /// `FileTreeItem` can be of two kinds
#[derive(PartialEq, Debug, Clone)] #[derive(PartialEq, Eq, Debug, Clone)]
pub enum FileTreeItemKind { pub enum FileTreeItemKind {
Path(PathCollapsed), Path(PathCollapsed),
File(StatusItem), File(StatusItem),

View file

@ -79,19 +79,19 @@ pub enum QueueEvent {
InputEvent(InputEvent), InputEvent(InputEvent),
} }
#[derive(Clone, Copy, Debug, PartialEq)] #[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SyntaxHighlightProgress { pub enum SyntaxHighlightProgress {
Progress, Progress,
Done, Done,
} }
#[derive(Clone, Copy, Debug, PartialEq)] #[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AsyncAppNotification { pub enum AsyncAppNotification {
/// ///
SyntaxHighlighting(SyntaxHighlightProgress), SyntaxHighlighting(SyntaxHighlightProgress),
} }
#[derive(Clone, Copy, Debug, PartialEq)] #[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AsyncNotification { pub enum AsyncNotification {
/// ///
App(AsyncAppNotification), App(AsyncAppNotification),