mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-27 00:14:52 +03:00
clippy fixes
This commit is contained in:
parent
0d2067fd13
commit
2df0a8957b
@ -97,6 +97,9 @@ impl CommitList {
|
||||
}
|
||||
|
||||
///
|
||||
//TODO: make const as soon as Option::<T>::as_ref
|
||||
// is stabilizeD to be const (not as of rust 1.47)
|
||||
#[allow(clippy::missing_const_for_fn)]
|
||||
pub fn tags(&self) -> Option<&Tags> {
|
||||
self.tags.as_ref()
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ impl ResetComponent {
|
||||
),
|
||||
strings::confirm_msg_delete_branch(
|
||||
&self.key_config,
|
||||
branch_ref.to_string(),
|
||||
branch_ref,
|
||||
),
|
||||
),
|
||||
};
|
||||
|
@ -8,7 +8,6 @@
|
||||
#![deny(clippy::panic)]
|
||||
#![allow(clippy::module_name_repetitions)]
|
||||
#![allow(clippy::multiple_crate_versions)]
|
||||
#![warn(clippy::missing_const_for_fn)]
|
||||
|
||||
mod app;
|
||||
mod clipboard;
|
||||
|
@ -97,7 +97,7 @@ pub fn confirm_title_delete_branch(
|
||||
}
|
||||
pub fn confirm_msg_delete_branch(
|
||||
_key_config: &SharedKeyConfig,
|
||||
branch_ref: String,
|
||||
branch_ref: &str,
|
||||
) -> String {
|
||||
format!("Confirm deleting branch: '{}' ?", branch_ref)
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ pub use scrolllist::draw_list;
|
||||
use tui::layout::{Constraint, Direction, Layout, Rect};
|
||||
|
||||
/// return the scroll position (line) necessary to have the `selection` in view if it is not already
|
||||
pub fn calc_scroll_top(
|
||||
pub const fn calc_scroll_top(
|
||||
current_top: usize,
|
||||
height_in_lines: usize,
|
||||
selection: usize,
|
||||
|
Loading…
Reference in New Issue
Block a user