Centralize clippy lints in .cargo/config.toml
This commit is contained in:
parent
b8ddd158da
commit
f137d71e8f
13 changed files with 16 additions and 81 deletions
|
|
@ -2,6 +2,7 @@
|
|||
lint = """
|
||||
clippy --workspace --no-deps -- \
|
||||
-D warnings \
|
||||
-A clippy::type_complexity \
|
||||
-D clippy::semicolon_if_nothing_returned \
|
||||
-D clippy::trivially-copy-pass-by-ref \
|
||||
-D clippy::default_trait_access \
|
||||
|
|
@ -9,9 +10,15 @@ clippy --workspace --no-deps -- \
|
|||
-D clippy::redundant-closure-for-method-calls \
|
||||
-D clippy::filter_map_next \
|
||||
-D clippy::manual_let_else \
|
||||
-D clippy::unused_async
|
||||
-D clippy::unused_async \
|
||||
-D clippy::from_over_into \
|
||||
-D clippy::needless_borrow \
|
||||
-D clippy::new_without_default \
|
||||
-D clippy::useless_conversion
|
||||
"""
|
||||
|
||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||
|
||||
nitpick = """
|
||||
clippy --workspace --no-deps -- \
|
||||
-D warnings \
|
||||
|
|
|
|||
|
|
@ -14,14 +14,8 @@
|
|||
missing_debug_implementations,
|
||||
missing_docs,
|
||||
unused_results,
|
||||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion,
|
||||
rustdoc::broken_intra_doc_links
|
||||
)]
|
||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||
pub mod alignment;
|
||||
pub mod clipboard;
|
||||
pub mod event;
|
||||
|
|
|
|||
|
|
@ -9,14 +9,8 @@
|
|||
missing_debug_implementations,
|
||||
missing_docs,
|
||||
unused_results,
|
||||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion,
|
||||
rustdoc::broken_intra_doc_links
|
||||
)]
|
||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
pub use futures;
|
||||
pub use iced_core as core;
|
||||
|
|
|
|||
|
|
@ -13,14 +13,8 @@
|
|||
//missing_docs,
|
||||
unsafe_code,
|
||||
unused_results,
|
||||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion,
|
||||
rustdoc::broken_intra_doc_links
|
||||
)]
|
||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
mod antialiasing;
|
||||
mod error;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,5 @@
|
|||
#![forbid(rust_2018_idioms)]
|
||||
#![deny(
|
||||
unsafe_code,
|
||||
unused_results,
|
||||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion,
|
||||
rustdoc::broken_intra_doc_links
|
||||
)]
|
||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||
#![deny(unsafe_code, unused_results, rustdoc::broken_intra_doc_links)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
pub mod compositor;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,11 +13,6 @@
|
|||
missing_debug_implementations,
|
||||
missing_docs,
|
||||
unused_results,
|
||||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion,
|
||||
rustdoc::broken_intra_doc_links
|
||||
)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
|
|
|
|||
|
|
@ -156,14 +156,8 @@
|
|||
missing_debug_implementations,
|
||||
missing_docs,
|
||||
unused_results,
|
||||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion,
|
||||
rustdoc::broken_intra_doc_links
|
||||
)]
|
||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
use iced_widget::graphics;
|
||||
use iced_widget::renderer;
|
||||
|
|
|
|||
|
|
@ -10,16 +10,10 @@
|
|||
#![forbid(unsafe_code, rust_2018_idioms)]
|
||||
#![deny(
|
||||
unused_results,
|
||||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion,
|
||||
missing_docs,
|
||||
unused_results,
|
||||
rustdoc::broken_intra_doc_links
|
||||
)]
|
||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||
pub use iced_core as core;
|
||||
|
||||
pub mod application;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,5 @@
|
|||
#![forbid(rust_2018_idioms)]
|
||||
#![deny(
|
||||
unsafe_code,
|
||||
unused_results,
|
||||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion,
|
||||
rustdoc::broken_intra_doc_links
|
||||
)]
|
||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||
#![deny(unsafe_code, unused_results, rustdoc::broken_intra_doc_links)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
pub mod window;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,14 +26,8 @@
|
|||
//missing_docs,
|
||||
unsafe_code,
|
||||
unused_results,
|
||||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion,
|
||||
rustdoc::broken_intra_doc_links
|
||||
)]
|
||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
pub mod layer;
|
||||
pub mod primitive;
|
||||
|
|
|
|||
|
|
@ -7,14 +7,8 @@
|
|||
missing_debug_implementations,
|
||||
missing_docs,
|
||||
unused_results,
|
||||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion,
|
||||
rustdoc::broken_intra_doc_links
|
||||
)]
|
||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
pub use iced_renderer as renderer;
|
||||
pub use iced_renderer::graphics;
|
||||
|
|
|
|||
|
|
@ -89,11 +89,6 @@ impl Value {
|
|||
Self { graphemes }
|
||||
}
|
||||
|
||||
/// Converts the [`Value`] into a `String`.
|
||||
pub fn to_string(&self) -> String {
|
||||
self.graphemes.concat()
|
||||
}
|
||||
|
||||
/// Inserts a new `char` at the given grapheme `index`.
|
||||
pub fn insert(&mut self, index: usize, c: char) {
|
||||
self.graphemes.insert(index, c.to_string());
|
||||
|
|
@ -131,3 +126,9 @@ impl Value {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Value {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.write_str(&self.graphemes.concat())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,15 +22,9 @@
|
|||
missing_debug_implementations,
|
||||
missing_docs,
|
||||
unused_results,
|
||||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion,
|
||||
unsafe_code,
|
||||
rustdoc::broken_intra_doc_links
|
||||
)]
|
||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
pub use iced_graphics as graphics;
|
||||
pub use iced_runtime as runtime;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue