diff options
-rwxr-xr-x | scripts/add-lints.bash | 9 | ||||
-rw-r--r-- | src/config/src/lib.rs | 9 | ||||
-rw-r--r-- | src/core/build.rs | 2 | ||||
-rw-r--r-- | src/core/src/components/help/mod.rs | 2 | ||||
-rw-r--r-- | src/core/src/lib.rs | 9 | ||||
-rw-r--r-- | src/core/src/modules/list/mod.rs | 2 | ||||
-rw-r--r-- | src/display/src/lib.rs | 9 | ||||
-rw-r--r-- | src/git/src/lib.rs | 9 | ||||
-rw-r--r-- | src/input/src/lib.rs | 9 | ||||
-rw-r--r-- | src/main.rs | 9 | ||||
-rw-r--r-- | src/runtime/src/lib.rs | 9 | ||||
-rw-r--r-- | src/todo_file/src/lib.rs | 9 | ||||
-rw-r--r-- | src/view/src/lib.rs | 9 |
13 files changed, 93 insertions, 3 deletions
diff --git a/scripts/add-lints.bash b/scripts/add-lints.bash index 27010df..8a7b002 100755 --- a/scripts/add-lints.bash +++ b/scripts/add-lints.bash @@ -92,6 +92,15 @@ content="\ rustdoc::missing_crate_level_docs, rustdoc::private_doc_tests, rustdoc::private_intra_doc_links +)] +#![cfg_attr( + include_nightly_lints, + allow( + clippy::arithmetic_side_effects, + clippy::bool_to_int_with_if, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core + ) )]\ " content="${content//$'\n'/\\n}" diff --git a/src/config/src/lib.rs b/src/config/src/lib.rs index b377bad..bafbcfd 100644 --- a/src/config/src/lib.rs +++ b/src/config/src/lib.rs @@ -73,6 +73,15 @@ rustdoc::private_doc_tests, rustdoc::private_intra_doc_links )] +#![cfg_attr( + include_nightly_lints, + allow( + clippy::arithmetic_side_effects, + clippy::bool_to_int_with_if, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core + ) +)] // LINT-REPLACE-END //! Git Interactive Rebase Tool - Configuration Module diff --git a/src/core/build.rs b/src/core/build.rs index bb90796..bbc8dd7 100644 --- a/src/core/build.rs +++ b/src/core/build.rs @@ -21,7 +21,7 @@ fn main() { fn git_revision_hash() -> Option<String> { let result = process::Command::new("git") - .args(&["rev-parse", "--short=10", "HEAD"]) + .args(["rev-parse", "--short=10", "HEAD"]) .output(); result.ok().and_then(|output| { let v = String::from_utf8_lossy(&output.stdout).trim().to_string(); diff --git a/src/core/src/components/help/mod.rs b/src/core/src/components/help/mod.rs index d234518..5639dae 100644 --- a/src/core/src/components/help/mod.rs +++ b/src/core/src/components/help/mod.rs @@ -76,7 +76,7 @@ impl Help { } pub(crate) fn input_options(&self) -> Option<&InputOptions> { - self.active.then(|| &INPUT_OPTIONS) + self.active.then_some(&INPUT_OPTIONS) } pub(crate) fn read_event(event: Event) -> Option<Event> { diff --git a/src/core/src/lib.rs b/src/core/src/lib.rs index d474c6d..4e061ff 100644 --- a/src/core/src/lib.rs +++ b/src/core/src/lib.rs @@ -73,6 +73,15 @@ rustdoc::private_doc_tests, rustdoc::private_intra_doc_links )] +#![cfg_attr( + include_nightly_lints, + allow( + clippy::arithmetic_side_effects, + clippy::bool_to_int_with_if, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core + ) +)] // LINT-REPLACE-END #![allow( clippy::as_conversions, diff --git a/src/core/src/modules/list/mod.rs b/src/core/src/modules/list/mod.rs index d4a2cc3..6274f22 100644 --- a/src/core/src/modules/list/mod.rs +++ b/src/core/src/modules/list/mod.rs @@ -95,7 +95,7 @@ impl Module for List { fn read_event(&self, event: Event, key_bindings: &KeyBindings) -> Event { select!( default || Self::read_event_default(event, key_bindings), - || (self.state == ListState::Edit).then(|| event), + || (self.state == ListState::Edit).then_some(event), || Help::read_event(event) ) } diff --git a/src/display/src/lib.rs b/src/display/src/lib.rs index 9472b9f..abad670 100644 --- a/src/display/src/lib.rs +++ b/src/display/src/lib.rs @@ -73,6 +73,15 @@ rustdoc::private_doc_tests, rustdoc::private_intra_doc_links )] +#![cfg_attr( + include_nightly_lints, + allow( + clippy::arithmetic_side_effects, + clippy::bool_to_int_with_if, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core + ) +)] // LINT-REPLACE-END //! Git Interactive Rebase Tool - Display Module diff --git a/src/git/src/lib.rs b/src/git/src/lib.rs index fab2987..43b1f3a 100644 --- a/src/git/src/lib.rs +++ b/src/git/src/lib.rs @@ -73,6 +73,15 @@ rustdoc::private_doc_tests, rustdoc::private_intra_doc_links )] +#![cfg_attr( + include_nightly_lints, + allow( + clippy::arithmetic_side_effects, + clippy::bool_to_int_with_if, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core + ) +)] // LINT-REPLACE-END //! Git Interactive Rebase Tool - Git Module diff --git a/src/input/src/lib.rs b/src/input/src/lib.rs index 191e0d6..c5f28cc 100644 --- a/src/input/src/lib.rs +++ b/src/input/src/lib.rs @@ -73,6 +73,15 @@ rustdoc::private_doc_tests, rustdoc::private_intra_doc_links )] +#![cfg_attr( + include_nightly_lints, + allow( + clippy::arithmetic_side_effects, + clippy::bool_to_int_with_if, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core + ) +)] // LINT-REPLACE-END //! Git Interactive Rebase Tool - Input Module diff --git a/src/main.rs b/src/main.rs index fe1c93e..3ba7535 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,6 +73,15 @@ rustdoc::private_doc_tests, rustdoc::private_intra_doc_links )] +#![cfg_attr( + include_nightly_lints, + allow( + clippy::arithmetic_side_effects, + clippy::bool_to_int_with_if, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core + ) +)] // LINT-REPLACE-END #![allow(missing_docs, rustdoc::missing_crate_level_docs)] diff --git a/src/runtime/src/lib.rs b/src/runtime/src/lib.rs index 2f2417e..5cbf544 100644 --- a/src/runtime/src/lib.rs +++ b/src/runtime/src/lib.rs @@ -73,6 +73,15 @@ rustdoc::private_doc_tests, rustdoc::private_intra_doc_links )] +#![cfg_attr( + include_nightly_lints, + allow( + clippy::arithmetic_side_effects, + clippy::bool_to_int_with_if, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core + ) +)] // LINT-REPLACE-END #![allow( clippy::as_conversions, diff --git a/src/todo_file/src/lib.rs b/src/todo_file/src/lib.rs index 7da920e..70ce957 100644 --- a/src/todo_file/src/lib.rs +++ b/src/todo_file/src/lib.rs @@ -73,6 +73,15 @@ rustdoc::private_doc_tests, rustdoc::private_intra_doc_links )] +#![cfg_attr( + include_nightly_lints, + allow( + clippy::arithmetic_side_effects, + clippy::bool_to_int_with_if, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core + ) +)] // LINT-REPLACE-END #![allow(clippy::indexing_slicing)] diff --git a/src/view/src/lib.rs b/src/view/src/lib.rs index 7ccaec5..8b53cf6 100644 --- a/src/view/src/lib.rs +++ b/src/view/src/lib.rs @@ -73,6 +73,15 @@ rustdoc::private_doc_tests, rustdoc::private_intra_doc_links )] +#![cfg_attr( + include_nightly_lints, + allow( + clippy::arithmetic_side_effects, + clippy::bool_to_int_with_if, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core + ) +)] // LINT-REPLACE-END #![allow(clippy::as_conversions, clippy::integer_division)] |