summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.cargo/config.toml9
-rw-r--r--core/src/lib.rs6
-rw-r--r--futures/src/lib.rs6
-rw-r--r--graphics/src/lib.rs6
-rw-r--r--renderer/src/lib.rs12
-rw-r--r--runtime/src/lib.rs5
-rw-r--r--src/lib.rs6
-rw-r--r--style/src/lib.rs6
-rw-r--r--tiny_skia/src/lib.rs12
-rw-r--r--wgpu/src/lib.rs6
-rw-r--r--widget/src/lib.rs6
-rw-r--r--widget/src/text_input/value.rs11
-rw-r--r--winit/src/lib.rs6
13 files changed, 16 insertions, 81 deletions
diff --git a/.cargo/config.toml b/.cargo/config.toml
index 9e265aa9..e3e32033 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -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 \
diff --git a/core/src/lib.rs b/core/src/lib.rs
index 1bfba7bd..54ea5839 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -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;
diff --git a/futures/src/lib.rs b/futures/src/lib.rs
index abc46176..d54ba18a 100644
--- a/futures/src/lib.rs
+++ b/futures/src/lib.rs
@@ -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;
diff --git a/graphics/src/lib.rs b/graphics/src/lib.rs
index 01a358ca..a0729058 100644
--- a/graphics/src/lib.rs
+++ b/graphics/src/lib.rs
@@ -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;
diff --git a/renderer/src/lib.rs b/renderer/src/lib.rs
index 1347ce04..7594d532 100644
--- a/renderer/src/lib.rs
+++ b/renderer/src/lib.rs
@@ -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;
diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs
index c3261cca..29e94d65 100644
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -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))]
diff --git a/src/lib.rs b/src/lib.rs
index 3cbe716a..cb6e86d4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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;
diff --git a/style/src/lib.rs b/style/src/lib.rs
index 0c555ed8..30f17a44 100644
--- a/style/src/lib.rs
+++ b/style/src/lib.rs
@@ -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;
diff --git a/tiny_skia/src/lib.rs b/tiny_skia/src/lib.rs
index e48468e9..ec8012be 100644
--- a/tiny_skia/src/lib.rs
+++ b/tiny_skia/src/lib.rs
@@ -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;
diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs
index 2f483751..6d26723e 100644
--- a/wgpu/src/lib.rs
+++ b/wgpu/src/lib.rs
@@ -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;
diff --git a/widget/src/lib.rs b/widget/src/lib.rs
index 7e204171..6feb948c 100644
--- a/widget/src/lib.rs
+++ b/widget/src/lib.rs
@@ -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;
diff --git a/widget/src/text_input/value.rs b/widget/src/text_input/value.rs
index d1b056c8..46a1f754 100644
--- a/widget/src/text_input/value.rs
+++ b/widget/src/text_input/value.rs
@@ -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())
+ }
+}
diff --git a/winit/src/lib.rs b/winit/src/lib.rs
index 9852a182..95b55bb9 100644
--- a/winit/src/lib.rs
+++ b/winit/src/lib.rs
@@ -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;