mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 08:58:21 +00:00
fix nightly clippy
This commit is contained in:
parent
ad0ec7e9b8
commit
c1cb868c4b
26 changed files with 36 additions and 36 deletions
|
|
@ -14,7 +14,7 @@ use std::{
|
|||
};
|
||||
|
||||
///
|
||||
#[derive(Hash, Clone, PartialEq)]
|
||||
#[derive(Hash, Clone, PartialEq, Eq)]
|
||||
pub struct BlameParams {
|
||||
/// path to the file to blame
|
||||
pub file_path: String,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ type ResultType = Vec<StatusItem>;
|
|||
struct Request<R, A>(R, A);
|
||||
|
||||
///
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
pub struct CommitFilesParams {
|
||||
///
|
||||
pub id: CommitId,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use std::{
|
|||
};
|
||||
|
||||
///
|
||||
#[derive(Debug, Hash, Clone, PartialEq)]
|
||||
#[derive(Debug, Hash, Clone, PartialEq, Eq)]
|
||||
pub enum DiffType {
|
||||
/// diff two commits
|
||||
Commits((CommitId, CommitId)),
|
||||
|
|
@ -27,7 +27,7 @@ pub enum DiffType {
|
|||
}
|
||||
|
||||
///
|
||||
#[derive(Debug, Hash, Clone, PartialEq)]
|
||||
#[derive(Debug, Hash, Clone, PartialEq, Eq)]
|
||||
pub struct DiffParams {
|
||||
/// path to the file to diff
|
||||
pub path: String,
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ use std::{
|
|||
};
|
||||
|
||||
/// 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 {
|
||||
/// this indicates that no new state was fetched but that a async process finished
|
||||
FinishUnchanged,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use easy_cast::{Conv, ConvFloat};
|
|||
use std::cmp;
|
||||
|
||||
///
|
||||
#[derive(Clone, Copy, Default, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Default, Debug, PartialEq, Eq)]
|
||||
pub struct ProgressPercent {
|
||||
/// percent 0..100
|
||||
pub progress: u8,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use std::{
|
|||
};
|
||||
|
||||
///
|
||||
#[derive(PartialEq)]
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub enum FetchStatus {
|
||||
/// previous fetch still running
|
||||
Pending,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ pub struct Status {
|
|||
}
|
||||
|
||||
///
|
||||
#[derive(Default, Hash, Copy, Clone, PartialEq)]
|
||||
#[derive(Default, Hash, Copy, Clone, PartialEq, Eq)]
|
||||
pub struct StatusParams {
|
||||
tick: u128,
|
||||
status_type: StatusType,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use git2::Signature;
|
|||
use scopetime::scope_time;
|
||||
|
||||
///
|
||||
#[derive(Debug, PartialEq, Default, Clone)]
|
||||
#[derive(Debug, PartialEq, Eq, Default, Clone)]
|
||||
pub struct CommitSignature {
|
||||
///
|
||||
pub name: String,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use super::{repository::repo, RepoPath};
|
|||
|
||||
// see https://git-scm.com/docs/git-config#Documentation/git-config.txt-statusshowUntrackedFiles
|
||||
/// represents the `status.showUntrackedFiles` git config state
|
||||
#[derive(Hash, Copy, Clone, PartialEq)]
|
||||
#[derive(Hash, Copy, Clone, PartialEq, Eq)]
|
||||
pub enum ShowUntrackedFilesConfig {
|
||||
///
|
||||
No,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use crate::error::{Error, Result};
|
|||
use git2::CredentialHelper;
|
||||
|
||||
/// basic Authentication Credentials
|
||||
#[derive(Debug, Clone, Default, PartialEq)]
|
||||
#[derive(Debug, Clone, Default, PartialEq, Eq)]
|
||||
pub struct BasicAuthCredential {
|
||||
///
|
||||
pub username: Option<String>,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use scopetime::scope_time;
|
|||
use std::{cell::RefCell, fs, path::Path, rc::Rc};
|
||||
|
||||
/// type of diff of a single line
|
||||
#[derive(Copy, Clone, PartialEq, Hash, Debug)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
|
||||
pub enum DiffLineType {
|
||||
/// just surrounding line, no change
|
||||
None,
|
||||
|
|
@ -127,7 +127,7 @@ pub struct FileDiff {
|
|||
}
|
||||
|
||||
/// 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 {
|
||||
/// see <https://libgit2.org/libgit2/#HEAD/type/git_diff_options>
|
||||
pub ignore_whitespace: bool,
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ pub fn hooks_post_commit(repo_path: &RepoPath) -> Result<HookResult> {
|
|||
}
|
||||
|
||||
///
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum HookResult {
|
||||
/// Everything went fine
|
||||
Ok,
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ pub fn conflict_free_rebase(
|
|||
}
|
||||
|
||||
///
|
||||
#[derive(PartialEq, Debug)]
|
||||
#[derive(PartialEq, Eq, Debug)]
|
||||
pub enum RebaseState {
|
||||
///
|
||||
Finished,
|
||||
|
|
@ -144,7 +144,7 @@ pub fn continue_rebase(
|
|||
}
|
||||
|
||||
///
|
||||
#[derive(PartialEq, Debug)]
|
||||
#[derive(PartialEq, Eq, Debug)]
|
||||
pub struct RebaseProgress {
|
||||
///
|
||||
pub steps: usize,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ pub trait AsyncProgress: Clone + Send + Sync {
|
|||
}
|
||||
|
||||
///
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum ProgressNotification {
|
||||
///
|
||||
UpdateTips {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ use scopetime::scope_time;
|
|||
use std::collections::HashSet;
|
||||
|
||||
///
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
pub enum PushTagsProgress {
|
||||
/// fetching tags from remote to check which local tags need pushing
|
||||
CheckRemote,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use git2::RepositoryState;
|
|||
use scopetime::scope_time;
|
||||
|
||||
///
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum RepoState {
|
||||
///
|
||||
Clean,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use std::path::Path;
|
|||
use super::{RepoPath, ShowUntrackedFilesConfig};
|
||||
|
||||
///
|
||||
#[derive(Copy, Clone, Hash, PartialEq, Debug)]
|
||||
#[derive(Copy, Clone, Hash, PartialEq, Eq, Debug)]
|
||||
pub enum StatusItemType {
|
||||
///
|
||||
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 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 {
|
||||
///
|
||||
WorkingDir,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use std::{
|
|||
};
|
||||
|
||||
///
|
||||
#[derive(Clone, Hash, PartialEq, Debug)]
|
||||
#[derive(Clone, Hash, PartialEq, Eq, Debug)]
|
||||
pub struct Tag {
|
||||
/// tag name
|
||||
pub name: String,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use std::{
|
|||
};
|
||||
|
||||
/// `tree_files` returns a list of `FileTree`
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub struct TreeFile {
|
||||
/// path of this file
|
||||
pub path: PathBuf,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use std::{
|
|||
};
|
||||
|
||||
///
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
pub struct Head {
|
||||
///
|
||||
pub name: String,
|
||||
|
|
|
|||
|
|
@ -83,11 +83,11 @@ impl TreeItemInfo {
|
|||
}
|
||||
|
||||
/// 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);
|
||||
|
||||
/// `FileTreeItem` can be of two kinds
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
pub enum FileTreeItemKind {
|
||||
Path(PathCollapsed),
|
||||
File,
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ pub enum Direction {
|
|||
}
|
||||
|
||||
///
|
||||
#[derive(PartialEq)]
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub enum CommandBlocking {
|
||||
Blocking,
|
||||
PassingOn,
|
||||
|
|
@ -220,7 +220,7 @@ pub trait DrawableComponent {
|
|||
}
|
||||
|
||||
///
|
||||
#[derive(PartialEq)]
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub enum EventState {
|
||||
Consumed,
|
||||
NotConsumed,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use tui::{
|
|||
Frame,
|
||||
};
|
||||
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||
pub enum AppOption {
|
||||
StatusShowUntracked,
|
||||
DiffIgnoreWhitespaces,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use tui::{
|
|||
Frame,
|
||||
};
|
||||
|
||||
#[derive(PartialEq)]
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub enum InputType {
|
||||
Singleline,
|
||||
Multiline,
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ impl TreeItemInfo {
|
|||
}
|
||||
|
||||
/// 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);
|
||||
|
||||
/// `FileTreeItem` can be of two kinds
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
pub enum FileTreeItemKind {
|
||||
Path(PathCollapsed),
|
||||
File(StatusItem),
|
||||
|
|
|
|||
|
|
@ -79,19 +79,19 @@ pub enum QueueEvent {
|
|||
InputEvent(InputEvent),
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum SyntaxHighlightProgress {
|
||||
Progress,
|
||||
Done,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum AsyncAppNotification {
|
||||
///
|
||||
SyntaxHighlighting(SyntaxHighlightProgress),
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum AsyncNotification {
|
||||
///
|
||||
App(AsyncAppNotification),
|
||||
|
|
|
|||
Loading…
Reference in a new issue