mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-24 05:30:32 +03:00
fix clippy and nightly build
This commit is contained in:
parent
c57543b4f8
commit
6e12c1e974
@ -22,7 +22,8 @@
|
||||
#![allow(
|
||||
clippy::module_name_repetitions,
|
||||
clippy::must_use_candidate,
|
||||
clippy::missing_errors_doc
|
||||
clippy::missing_errors_doc,
|
||||
clippy::empty_docs
|
||||
)]
|
||||
//TODO:
|
||||
#![allow(
|
||||
|
@ -15,9 +15,12 @@
|
||||
#![deny(clippy::panic)]
|
||||
#![deny(clippy::match_like_matches_macro)]
|
||||
#![deny(clippy::needless_update)]
|
||||
#![allow(clippy::module_name_repetitions)]
|
||||
#![allow(clippy::must_use_candidate)]
|
||||
#![allow(clippy::missing_errors_doc)]
|
||||
#![allow(
|
||||
clippy::module_name_repetitions,
|
||||
clippy::must_use_candidate,
|
||||
clippy::missing_errors_doc,
|
||||
clippy::empty_docs
|
||||
)]
|
||||
|
||||
mod error;
|
||||
mod filetree;
|
||||
|
@ -1,24 +1,20 @@
|
||||
use thiserror::Error;
|
||||
|
||||
///
|
||||
/// crate specific error type
|
||||
#[derive(Error, Debug)]
|
||||
pub enum HooksError {
|
||||
///
|
||||
#[error("git error:{0}")]
|
||||
Git(#[from] git2::Error),
|
||||
|
||||
///
|
||||
#[error("io error:{0}")]
|
||||
Io(#[from] std::io::Error),
|
||||
|
||||
///
|
||||
#[error("path string conversion error")]
|
||||
PathToString,
|
||||
|
||||
///
|
||||
#[error("shellexpand error:{0}")]
|
||||
ShellExpand(#[from] shellexpand::LookupError<std::env::VarError>),
|
||||
}
|
||||
|
||||
///
|
||||
/// crate specific `Result` type
|
||||
pub type Result<T> = std::result::Result<T, HooksError>;
|
||||
|
@ -46,7 +46,6 @@ pub const HOOK_PREPARE_COMMIT_MSG: &str = "prepare-commit-msg";
|
||||
|
||||
const HOOK_COMMIT_MSG_TEMP_FILE: &str = "COMMIT_EDITMSG";
|
||||
|
||||
///
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum HookResult {
|
||||
/// No hook found
|
||||
@ -171,7 +170,6 @@ pub fn hooks_post_commit(
|
||||
hook.run_hook(&[])
|
||||
}
|
||||
|
||||
///
|
||||
pub enum PrepareCommitMsgSource {
|
||||
Message,
|
||||
Template,
|
||||
|
@ -1,7 +1,7 @@
|
||||
use git2::Repository;
|
||||
use tempfile::TempDir;
|
||||
|
||||
///
|
||||
/// initialize test repo in temp path
|
||||
pub fn repo_init_empty() -> (TempDir, Repository) {
|
||||
init_log();
|
||||
|
||||
@ -18,7 +18,7 @@ pub fn repo_init_empty() -> (TempDir, Repository) {
|
||||
(td, repo)
|
||||
}
|
||||
|
||||
///
|
||||
/// initialize test repo in temp path with an empty first commit
|
||||
pub fn repo_init() -> (TempDir, Repository) {
|
||||
init_log();
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
//! simple macro to insert a scope based runtime measure that logs the result
|
||||
|
||||
#![forbid(unsafe_code)]
|
||||
#![forbid(missing_docs)]
|
||||
#![deny(unused_imports)]
|
||||
#![deny(clippy::unwrap_used)]
|
||||
#![deny(clippy::perf)]
|
||||
|
||||
use std::time::Instant;
|
||||
|
||||
///
|
||||
pub struct ScopeTimeLog<'a> {
|
||||
title: &'a str,
|
||||
mod_path: &'a str,
|
||||
@ -17,9 +15,7 @@ pub struct ScopeTimeLog<'a> {
|
||||
time: Instant,
|
||||
}
|
||||
|
||||
///
|
||||
impl<'a> ScopeTimeLog<'a> {
|
||||
///
|
||||
pub fn new(
|
||||
mod_path: &'a str,
|
||||
title: &'a str,
|
||||
@ -49,7 +45,7 @@ impl<'a> Drop for ScopeTimeLog<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// measures runtime of scope and prints it into log
|
||||
#[cfg(feature = "enabled")]
|
||||
#[macro_export]
|
||||
macro_rules! scope_time {
|
||||
|
@ -19,7 +19,8 @@
|
||||
#![allow(
|
||||
clippy::multiple_crate_versions,
|
||||
clippy::bool_to_int_with_if,
|
||||
clippy::module_name_repetitions
|
||||
clippy::module_name_repetitions,
|
||||
clippy::empty_docs
|
||||
)]
|
||||
|
||||
//TODO:
|
||||
|
Loading…
Reference in New Issue
Block a user