Compiling proc-macro2 v1.0.106 Compiling unicode-ident v1.0.24 Compiling quote v1.0.45 Compiling libc v0.2.186 Compiling libm v0.2.16 Compiling version_check v0.9.5 Compiling serde_core v1.0.228 Compiling slotmap v1.1.1 Compiling serde v1.0.228 Checking xmlparser v0.13.6 Compiling syn v2.0.117 Compiling thiserror v2.0.18 Checking mmapio v0.9.1 Checking azul-simplecss v0.2.0 Checking rust-fontconfig v4.4.2 Checking azul-css v0.0.8 (/home/runner/work/azul/azul/css) Checking arrayvec v0.7.6 Checking grid v1.0.1 Checking gl-context-loader v0.1.10 Checking taffy v0.10.1 warning: unknown lint: `mismatched_lifetime_syntaxes` --> css/src/lib.rs:33:5 | 33 | mismatched_lifetime_syntaxes, // macro-generated code | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unknown_lints)]` on by default warning: empty line after doc comment --> css/src/compact_cache.rs:897:1 | 897 | / /// Each function is `#[inline(always)]` for zero-cost extraction. 898 | | | |_^ 899 | #[inline(always)] 900 | pub fn decode_display(t1: u64) -> LayoutDisplay { | --------------------- the comment documents this function | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments note: the lint level is defined here --> css/src/lib.rs:16:9 | 16 | #![warn(clippy::all)] | ^^^^^^^^^^^ = note: `#[warn(clippy::empty_line_after_doc_comments)]` implied by `#[warn(clippy::all)]` = help: if the empty line is unintentional, remove it warning: empty line after doc comment --> css/src/compact_cache.rs:1022:1 | 1022 | / /// Sentinel values use the top of the u32 range (0xFFFFFFF9..0xFFFFFFFF). 1023 | | | |_^ ... 1026 | pub fn encode_pixel_value_u32(pv: &PixelValue) -> u32 { | ----------------------------- the comment documents this function | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = help: if the empty line is unintentional, remove it help: if the documentation should include the empty line include it in the comment | 1023 | /// | warning: empty line after doc comment --> css/src/compact_cache.rs:1398:1 | 1398 | / /// - Are rare CSS properties (grid, transforms, etc.) ... | 1402 | | | |_^ ... 1411 | pub struct CompactLayoutCache { | ----------------------------- the comment documents this struct | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = help: if the empty line is unintentional, remove it help: if the doc comment should not document struct `CompactLayoutCache` then comment it out | 1394 ~ // /// Overflow properties that couldn't fit in Tier 1/2 encoding. 1395 ~ // /// Contains the original `CssProperty` values for properties that: 1396 ~ // /// - Have calc() expressions 1397 ~ // /// - Exceed the numeric range of compact encoding 1398 ~ // /// - Are rare CSS properties (grid, transforms, etc.) | warning: consider removing unnecessary double parentheses --> css/src/props/basic/color.rs:1036:59 | 1036 | CssColorParseErrorOwned::IntValueParseErr((*e)) | ^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens = note: `#[warn(clippy::double_parens)]` implied by `#[warn(clippy::all)]` warning: consider removing unnecessary double parentheses --> css/src/props/basic/color.rs:1039:61 | 1039 | CssColorParseErrorOwned::FloatValueParseErr((*e)) | ^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens warning: duplicated attribute --> css/src/props/property.rs:3391:7 | 3391 | #[cfg(feature = "parser")] | ^^^^^^^^^^^^^^^^^^ | note: first defined here --> css/src/props/property.rs:3361:7 | 3361 | #[cfg(feature = "parser")] | ^^^^^^^^^^^^^^^^^^ help: remove this attribute --> css/src/props/property.rs:3391:7 | 3391 | #[cfg(feature = "parser")] | ^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duplicated_attributes = note: `#[warn(clippy::duplicated_attributes)]` implied by `#[warn(clippy::all)]` warning: empty line after outer attribute --> css/src/props/property.rs:3361:1 | 3361 | / #[cfg(feature = "parser")] 3362 | | | |_^ ... 3392 | pub fn parse_combined_css_property<'a>( | ---------------------------------- the attribute applies to this function | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr = note: `#[warn(clippy::empty_line_after_outer_attr)]` implied by `#[warn(clippy::all)]` = help: if the empty line is unintentional, remove it Checking base64 v0.22.1 Compiling serde_derive v1.0.228 Compiling thiserror-impl v2.0.18 Checking lru v0.16.4 Checking smallvec v1.15.1 warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:83:24 | 83 | .join(&format!(",\r\n{}", t)); | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args = note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::all)]` help: change this to | 83 - .join(&format!(",\r\n{}", t)); 83 + .join(&format!(",\r\n{t}")); | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:85:30 | 85 | result.push_str(&format!( | ______________________________^ 86 | | "\r\n const STYLE_FILTER_{}_ITEMS: &[StyleFilter] = &[\r\n{}{}\r\n{}];", 87 | | key, t2, val, t 88 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:96:24 | 96 | .join(&format!(",\r\n{}", t)); | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 96 - .join(&format!(",\r\n{}", t)); 96 + .join(&format!(",\r\n{t}")); | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:98:30 | 98 | result.push_str(&format!( | ______________________________^ 99 | | "\r\n const STYLE_BACKGROUND_SIZE_{}_ITEMS: &[StyleBackgroundSize] = \ 100 | | &[\r\n{}{}\r\n{}];", 101 | | key, t2, val, t 102 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:110:24 | 110 | .join(&format!(",\r\n{}", t)); | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 110 - .join(&format!(",\r\n{}", t)); 110 + .join(&format!(",\r\n{t}")); | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:112:30 | 112 | result.push_str(&format!( | ______________________________^ 113 | | "\r\n const STYLE_BACKGROUND_REPEAT_{}_ITEMS: &[StyleBackgroundRepeat] = \ 114 | | &[\r\n{}{}\r\n{}];", 115 | | key, t2, val, t 116 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:124:24 | 124 | .join(&format!(",\r\n{}", t)); | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 124 - .join(&format!(",\r\n{}", t)); 124 + .join(&format!(",\r\n{t}")); | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:126:30 | 126 | result.push_str(&format!( | ______________________________^ 127 | | "\r\n const STYLE_BACKGROUND_CONTENT_{}_ITEMS: &[StyleBackgroundContent] = \ 128 | | &[\r\n{}{}\r\n{}];", 129 | | key, t2, val, t 130 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:138:24 | 138 | .join(&format!(",\r\n{}", t)); | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 138 - .join(&format!(",\r\n{}", t)); 138 + .join(&format!(",\r\n{t}")); | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:140:30 | 140 | result.push_str(&format!( | ______________________________^ 141 | | "\r\n const STYLE_BACKGROUND_POSITION_{}_ITEMS: &[StyleBackgroundPosition] = \ 142 | | &[\r\n{}{}\r\n{}];", 143 | | key, t2, val, t 144 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:150:30 | 150 | result.push_str(&format!( | ______________________________^ 151 | | "\r\n const STYLE_TRANSFORM_{}_ITEMS: &[StyleTransform] = &[\r\n{}{}\r\n{}];", 152 | | key, t2, val, t 153 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:159:30 | 159 | result.push_str(&format!( | ______________________________^ 160 | | "\r\n const STYLE_FONT_FAMILY_{}_ITEMS: &[StyleFontFamily] = &[\r\n{}{}\r\n{}];", 161 | | key, t2, val, t 162 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:168:30 | 168 | result.push_str(&format!( | ______________________________^ 169 | | "\r\n const LINEAR_COLOR_STOP_{}_ITEMS: &[NormalizedLinearColorStop] = \ 170 | | &[\r\n{}{}\r\n{}];", 171 | | key, t2, val, t 172 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:178:30 | 178 | result.push_str(&format!( | ______________________________^ 179 | | "\r\n const RADIAL_COLOR_STOP_{}_ITEMS: &[NormalizedRadialColorStop] = \ 180 | | &[\r\n{}{}\r\n{}];", 181 | | key, t2, val, t 182 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:285:27 | 285 | SizeMetric::Pt => format!( | ___________________________^ 286 | | "PixelValue::const_pt_fractional({}, {})", 287 | | pre_comma, post_comma 288 | | ), | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:289:27 | 289 | SizeMetric::Em => format!( | ___________________________^ 290 | | "PixelValue::const_em_fractional({}, {})", 291 | | pre_comma, post_comma 292 | | ), | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:293:18 | 293 | other => format!( | __________________^ 294 | | "PixelValue::const_from_metric_fractional(SizeMetric::{:?}, {}, {})", 295 | | other, pre_comma, post_comma 296 | | ), | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:315:5 | 315 | / format!( 316 | | "FloatValue::const_new_fractional({}, {})", 317 | | pre_comma, post_comma 318 | | ) | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:328:5 | 328 | / format!( 329 | | "PercentageValue::const_new_fractional({}, {})", 330 | | pre_comma, post_comma 331 | | ) | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:358:30 | 358 | GridLine::Line(n) => format!("GridLine::Line({})", n), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 358 - GridLine::Line(n) => format!("GridLine::Line({})", n), 358 + GridLine::Line(n) => format!("GridLine::Line({n})"), | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:364:30 | 364 | GridLine::Span(n) => format!("GridLine::Span({})", n), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 364 - GridLine::Span(n) => format!("GridLine::Span({})", n), 364 + GridLine::Span(n) => format!("GridLine::Span({n})"), | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:384:13 | 384 | format!("ColorOrSystem::System(SystemColorRef::{})", variant) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 384 - format!("ColorOrSystem::System(SystemColorRef::{})", variant) 384 + format!("ColorOrSystem::System(SystemColorRef::{variant})") | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:754:39 | 754 | OptionF32::Some(v) => format!("OptionF32::Some({:?})", v), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 754 - OptionF32::Some(v) => format!("OptionF32::Some({:?})", v), 754 + OptionF32::Some(v) => format!("OptionF32::Some({v:?})"), | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:827:46 | 827 | StyleBackgroundContent::Image(id) => format!("StyleBackgroundContent::Image({:?})", id), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 827 - StyleBackgroundContent::Image(id) => format!("StyleBackgroundContent::Image({:?})", id), 827 + StyleBackgroundContent::Image(id) => format!("StyleBackgroundContent::Image({id:?})"), | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:907:16 | 907 | .join(&format!(",\r\n{}", t)) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 907 - .join(&format!(",\r\n{}", t)) 907 + .join(&format!(",\r\n{t}")) | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:924:16 | 924 | .join(&format!(",\r\n{}", t)) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 924 - .join(&format!(",\r\n{}", t)) 924 + .join(&format!(",\r\n{t}")) | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:1023:16 | 1023 | .join(&format!(",\r\n{}", t)) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1023 - .join(&format!(",\r\n{}", t)) 1023 + .join(&format!(",\r\n{t}")) | warning: variables can be used directly in the `format!` string --> css/src/codegen/format.rs:1145:16 | 1145 | .join(&format!(",\r\n{}", t)) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1145 - .join(&format!(",\r\n{}", t)) 1145 + .join(&format!(",\r\n{t}")) | warning: variables can be used directly in the `format!` string --> css/src/codegen/rust.rs:342:5 | 342 | format!("vec![\r\n{}\r\n{}].into()", selectors_formatted, t) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 342 - format!("vec![\r\n{}\r\n{}].into()", selectors_formatted, t) 342 + format!("vec![\r\n{selectors_formatted}\r\n{t}].into()") | warning: variables can be used directly in the `format!` string --> css/src/codegen/rust.rs:350:13 | 350 | format!("CssPathSelector::Class(String::from({:?}))", class) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 350 - format!("CssPathSelector::Class(String::from({:?}))", class) 350 + format!("CssPathSelector::Class(String::from({class:?}))") | warning: variables can be used directly in the `format!` string --> css/src/codegen/rust.rs:352:36 | 352 | CssPathSelector::Id(id) => format!("CssPathSelector::Id(String::from({:?}))", id), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 352 - CssPathSelector::Id(id) => format!("CssPathSelector::Id(String::from({:?}))", id), 352 + CssPathSelector::Id(id) => format!("CssPathSelector::Id(String::from({id:?}))"), | warning: variables can be used directly in the `format!` string --> css/src/codegen/rust.rs:419:45 | 419 | CssNthChildSelector::Number(num) => format!("CssNthChildSelector::Number({})", num), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 419 - CssNthChildSelector::Number(num) => format!("CssNthChildSelector::Number({})", num), 419 + CssNthChildSelector::Number(num) => format!("CssNthChildSelector::Number({num})"), | warning: variables can be used directly in the `format!` string --> css/src/codegen/rust.rs:425:15 | 425 | }) => format!( | _______________^ 426 | | "CssNthChildSelector::Pattern(CssNthChildPattern {{ pattern_repeat: {}, offset: {} }})", 427 | | pattern_repeat, offset 428 | | ), | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: doc list item without indentation --> css/src/compact_cache.rs:1403:5 | 1403 | /// Three-tier compact layout property cache. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation = note: `#[warn(clippy::doc_lazy_continuation)]` implied by `#[warn(clippy::all)]` help: indent this line | 1403 | /// Three-tier compact layout property cache. | ++ warning: comparing with null is better expressed by the `.is_null()` method --> css/src/macros.rs:622:20 | 622 | if res == core::ptr::null_mut() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `res.is_null()` | ::: css/src/corety.rs:492:1 | 492 | impl_vec_mut!(u8, U8Vec); | ------------------------ in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: `#[warn(clippy::cmp_null)]` implied by `#[warn(clippy::all)]` = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: this public function might dereference a raw pointer but is not marked `unsafe` --> css/src/corety.rs:517:58 | 517 | let slice = unsafe { core::slice::from_raw_parts(ptr.add(start), len) }; | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref = note: `#[warn(clippy::not_unsafe_ptr_arg_deref)]` implied by `#[warn(clippy::all)]` warning: comparing with null is better expressed by the `.is_null()` method --> css/src/macros.rs:622:20 | 622 | if res == core::ptr::null_mut() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `res.is_null()` | ::: css/src/corety.rs:546:1 | 546 | impl_vec_mut!(u32, U32Vec); | -------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: you are implementing `Ord` explicitly but have derived `PartialOrd` --> css/src/corety.rs:627:1 | 627 | / impl Ord for OptionF32 { 628 | | fn cmp(&self, other: &Self) -> core::cmp::Ordering { 629 | | match (self, other) { 630 | | (OptionF32::None, OptionF32::None) => core::cmp::Ordering::Equal, ... | 638 | | } | |_^ | note: `PartialOrd` implemented here --> css/src/corety.rs:609:62 | 609 | impl_option!(f32, OptionF32, [Debug, Copy, Clone, PartialEq, PartialOrd]); | ^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord = note: `#[warn(clippy::derive_ord_xor_partial_ord)]` implied by `#[warn(clippy::all)]` warning: comparing with null is better expressed by the `.is_null()` method --> css/src/macros.rs:622:20 | 622 | if res == core::ptr::null_mut() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `res.is_null()` | ::: css/src/css.rs:44:1 | 44 | impl_vec_mut!(Css, CssVec); | -------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: comparing with null is better expressed by the `.is_null()` method --> css/src/macros.rs:622:20 | 622 | if res == core::ptr::null_mut() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `res.is_null()` | ::: css/src/css.rs:51:1 | 51 | impl_vec_mut!(CssRuleBlock, CssRuleBlockVec); | -------------------------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: you are implementing `Ord` explicitly but have derived `PartialOrd` --> css/src/css.rs:124:1 | 124 | / impl Ord for Css { 125 | | fn cmp(&self, other: &Self) -> core::cmp::Ordering { 126 | | self.rules.as_ref().len().cmp(&other.rules.as_ref().len()) 127 | | } 128 | | } | |_^ | note: `PartialOrd` implemented here --> css/src/css.rs:28:37 | 28 | #[derive(Debug, Default, PartialEq, PartialOrd, Clone)] | ^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord warning: variables can be used directly in the `format!` string --> css/src/css.rs:219:26 | 219 | Static(s) => format!("{:?}", s), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 219 - Static(s) => format!("{:?}", s), 219 + Static(s) => format!("{s:?}"), | warning: variables can be used directly in the `format!` string --> css/src/css.rs:450:25 | 450 | Exact(e) => write!(f, "{}", e), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 450 - Exact(e) => write!(f, "{}", e), 450 + Exact(e) => write!(f, "{e}"), | warning: comparing with null is better expressed by the `.is_null()` method --> css/src/macros.rs:622:20 | 622 | if res == core::ptr::null_mut() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `res.is_null()` | ::: css/src/css.rs:635:1 | 635 | impl_vec_mut!(CssDeclaration, CssDeclarationVec); | ------------------------------------------------ in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: variables can be used directly in the `format!` string --> css/src/css.rs:976:50 | 976 | NodeTypeTagParseError::Invalid(e) => write!(f, "Invalid node type: {}", e), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 976 - NodeTypeTagParseError::Invalid(e) => write!(f, "Invalid node type: {}", e), 976 + NodeTypeTagParseError::Invalid(e) => write!(f, "Invalid node type: {e}"), | warning: variables can be used directly in the `format!` string --> css/src/css.rs:1505:13 | 1505 | write!(f, "{}", selector)?; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1505 - write!(f, "{}", selector)?; 1505 + write!(f, "{selector}")?; | warning: variables can be used directly in the `format!` string --> css/src/css.rs:1513:9 | 1513 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1513 - write!(f, "{}", self) 1513 + write!(f, "{self}") | warning: this `impl` can be derived --> css/src/css.rs:1583:1 | 1583 | / impl Default for AttributeMatchOp { 1584 | | fn default() -> Self { 1585 | | AttributeMatchOp::Exists 1586 | | } 1587 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `#[warn(clippy::derivable_impls)]` implied by `#[warn(clippy::all)]` help: replace the manual implementation with a derive attribute and mark the default variant | 1566 + #[derive(Default)] 1567 ~ pub enum AttributeMatchOp { 1568 | /// `[attr]` — attribute is present (any value). 1569 ~ #[default] 1570 ~ Exists, | warning: variables can be used directly in the `format!` string --> css/src/css.rs:1602:24 | 1602 | Type(n) => write!(f, "{}", n), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1602 - Type(n) => write!(f, "{}", n), 1602 + Type(n) => write!(f, "{n}"), | warning: variables can be used directly in the `format!` string --> css/src/css.rs:1603:25 | 1603 | Class(c) => write!(f, ".{}", c), | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1603 - Class(c) => write!(f, ".{}", c), 1603 + Class(c) => write!(f, ".{c}"), | warning: variables can be used directly in the `format!` string --> css/src/css.rs:1604:22 | 1604 | Id(i) => write!(f, "#{}", i), | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1604 - Id(i) => write!(f, "#{}", i), 1604 + Id(i) => write!(f, "#{i}"), | warning: variables can be used directly in the `format!` string --> css/src/css.rs:1605:34 | 1605 | PseudoSelector(p) => write!(f, ":{}", p), | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1605 - PseudoSelector(p) => write!(f, ":{}", p), 1605 + PseudoSelector(p) => write!(f, ":{p}"), | warning: variables can be used directly in the `format!` string --> css/src/css.rs:1606:29 | 1606 | Attribute(a) => write!(f, "{}", a), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1606 - Attribute(a) => write!(f, "{}", a), 1606 + Attribute(a) => write!(f, "{a}"), | warning: variables can be used directly in the `format!` string --> css/src/css.rs:1688:26 | 1688 | Number(u) => write!(f, "{}", u), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1688 - Number(u) => write!(f, "{}", u), 1688 + Number(u) => write!(f, "{u}"), | warning: variables can be used directly in the `format!` string --> css/src/css.rs:1702:28 | 1702 | NthChild(u) => write!(f, "nth-child({})", u), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1702 - NthChild(u) => write!(f, "nth-child({})", u), 1702 + NthChild(u) => write!(f, "nth-child({u})"), | warning: stripping a prefix manually --> css/src/dynamic_selector.rs:1530:31 | 1530 | let media_query = rule_content[6..].trim(); | ^^^^^^^^^^^^^^^^^ | note: the prefix was tested here --> css/src/dynamic_selector.rs:1529:9 | 1529 | if rule_content.starts_with("media ") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip = note: `#[warn(clippy::manual_strip)]` implied by `#[warn(clippy::all)]` help: try using the `strip_prefix` method | 1529 ~ if let Some() = rule_content.strip_prefix("media ") { 1530 ~ let media_query = .trim(); | warning: stripping a prefix manually --> css/src/dynamic_selector.rs:1538:25 | 1538 | let theme = rule_content[6..].trim(); | ^^^^^^^^^^^^^^^^^ | note: the prefix was tested here --> css/src/dynamic_selector.rs:1537:9 | 1537 | if rule_content.starts_with("theme ") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip help: try using the `strip_prefix` method | 1537 ~ if let Some() = rule_content.strip_prefix("theme ") { 1538 ~ let theme = .trim(); | warning: stripping a prefix manually --> css/src/dynamic_selector.rs:1549:17 | 1549 | rule_content[5..].trim_end_matches(')').trim() | ^^^^^^^^^^^^^^^^^ | note: the prefix was tested here --> css/src/dynamic_selector.rs:1548:28 | 1548 | let lang_str = if rule_content.starts_with("lang(") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip help: try using the `strip_prefix` method | 1548 ~ let lang_str = if let Some() = rule_content.strip_prefix("lang(") { 1549 ~ .trim_end_matches(')').trim() | warning: variables can be used directly in the `format!` string --> css/src/parser2.rs:295:24 | 295 | Some(v) => format!("{}({})", selector, v), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 295 - Some(v) => format!("{}({})", selector, v), 295 + Some(v) => format!("{selector}({v})"), | warning: variables can be used directly in the `format!` string --> css/src/parser2.rs:298:9 | 298 | format!("Invalid or unknown CSS pseudo-selector: ':{}'", format_str) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 298 - format!("Invalid or unknown CSS pseudo-selector: ':{}'", format_str) 298 + format!("Invalid or unknown CSS pseudo-selector: ':{format_str}'") | warning: variables can be used directly in the `format!` string --> css/src/parser2.rs:1028:9 | 1028 | format!("Skipped rule for selector '{}': {}", sel, error) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1028 - format!("Skipped rule for selector '{}': {}", sel, error) 1028 + format!("Skipped rule for selector '{sel}': {error}") | warning: variables can be used directly in the `format!` string --> css/src/props/basic/angle.rs:54:9 | 54 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 54 - write!(f, "{}", self) 54 + write!(f, "{self}") | warning: variables can be used directly in the `format!` string --> css/src/props/basic/angle.rs:66:9 | 66 | format!("{}", self) | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 66 - format!("{}", self) 66 + format!("{self}") | warning: stripping a suffix manually --> css/src/props/basic/angle.rs:287:25 | 287 | let value = &input[..input.len() - match_val.len()]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the suffix was tested here --> css/src/props/basic/angle.rs:286:9 | 286 | if input.ends_with(match_val) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip help: try using the `strip_suffix` method | 286 ~ if let Some() = input.strip_suffix(match_val) { 287 ~ let value = ; | warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value --> css/src/props/basic/animation.rs:441:17 | 441 | fn to_cubic(&self) -> SvgCubicCurve { | ^^^^^ | = help: consider choosing a less ambiguous name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention = note: `#[warn(clippy::wrong_self_convention)]` implied by `#[warn(clippy::all)]` warning: stripping a prefix manually --> css/src/props/basic/color.rs:1109:29 | 1109 | parse_color_no_hash(&input[1..]) | ^^^^^^^^^^^ | note: the prefix was tested here --> css/src/props/basic/color.rs:1108:5 | 1108 | if input.starts_with('#') { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip help: try using the `strip_prefix` method | 1108 ~ if let Some() = input.strip_prefix('#') { 1109 ~ parse_color_no_hash() | warning: variables can be used directly in the `format!` string --> css/src/props/basic/direction.rs:53:9 | 53 | format!("{}", self) | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 53 - format!("{}", self) 53 + format!("{self}") | warning: variables can be used directly in the `format!` string --> css/src/props/basic/direction.rs:150:36 | 150 | Direction::Angle(a) => format!("{}", a), | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 150 - Direction::Angle(a) => format!("{}", a), 150 + Direction::Angle(a) => format!("{a}"), | warning: variables can be used directly in the `format!` string --> css/src/props/basic/font.rs:312:21 | 312 | format!("\"{}\"", owned) | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 312 - format!("\"{}\"", owned) 312 + format!("\"{owned}\"") | warning: variables can be used directly in the `format!` string --> css/src/props/basic/font.rs:374:17 | 374 | format!("StyleFontFamily::SystemType(SystemFontType::{:?})", st) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 374 - format!("StyleFontFamily::SystemType(SystemFontType::{:?})", st) 374 + format!("StyleFontFamily::SystemType(SystemFontType::{st:?})") | warning: variables can be used directly in the `format!` string --> css/src/props/basic/geometry.rs:22:9 | 22 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 22 - write!(f, "{}", self) 22 + write!(f, "{self}") | warning: variables can be used directly in the `format!` string --> css/src/props/basic/geometry.rs:58:9 | 58 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 58 - write!(f, "{}", self) 58 + write!(f, "{self}") | warning: comparing with null is better expressed by the `.is_null()` method --> css/src/macros.rs:622:20 | 622 | if res == core::ptr::null_mut() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `res.is_null()` | ::: css/src/props/basic/geometry.rs:107:1 | 107 | impl_vec_mut!(LayoutRect, LayoutRectVec); | ---------------------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: variables can be used directly in the `format!` string --> css/src/props/basic/geometry.rs:113:9 | 113 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 113 - write!(f, "{}", self) 113 + write!(f, "{self}") | warning: variables can be used directly in the `format!` string --> css/src/props/basic/length.rs:103:9 | 103 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 103 - write!(f, "{}", self) 103 + write!(f, "{self}") | warning: variables can be used directly in the `format!` string --> css/src/props/basic/pixel.rs:651:9 | 651 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 651 - write!(f, "{}", self) 651 + write!(f, "{self}") | warning: stripping a suffix manually --> css/src/props/basic/pixel.rs:763:25 | 763 | let value = &input[..input.len() - match_val.len()]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the suffix was tested here --> css/src/props/basic/pixel.rs:762:9 | 762 | if input.ends_with(match_val) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip help: try using the `strip_suffix` method | 762 ~ if let Some() = input.strip_suffix(match_val) { 763 ~ let value = ; | warning: variables can be used directly in the `format!` string --> css/src/props/basic/pixel.rs:1005:45 | 1005 | PixelValueOrSystem::Value(v) => write!(f, "{}", v), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1005 - PixelValueOrSystem::Value(v) => write!(f, "{}", v), 1005 + PixelValueOrSystem::Value(v) => write!(f, "{v}"), | warning: variables can be used directly in the `format!` string --> css/src/props/basic/pixel.rs:1006:46 | 1006 | PixelValueOrSystem::System(s) => write!(f, "{}", s), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1006 - PixelValueOrSystem::System(s) => write!(f, "{}", s), 1006 + PixelValueOrSystem::System(s) => write!(f, "{s}"), | warning: variables can be used directly in the `format!` string --> css/src/props/layout/column.rs:198:40 | 198 | ColumnCount::Integer(i) => format!("ColumnCount::Integer({})", i), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 198 - ColumnCount::Integer(i) => format!("ColumnCount::Integer({})", i), 198 + ColumnCount::Integer(i) => format!("ColumnCount::Integer({i})"), | warning: comparing with null is better expressed by the `.is_null()` method --> css/src/macros.rs:622:20 | 622 | if res == core::ptr::null_mut() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `res.is_null()` | ::: css/src/props/layout/dimensions.rs:78:1 | 78 | impl_vec_mut!(CalcAstItem, CalcAstItemVec); | ------------------------------------------ in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: variables can be used directly in the `format!` string --> css/src/props/layout/grid.rs:79:39 | 79 | GridTrackSizing::Fr(f) => format!("{}fr", f), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 79 - GridTrackSizing::Fr(f) => format!("{}fr", f), 79 + GridTrackSizing::Fr(f) => format!("{f}fr"), | warning: comparing with null is better expressed by the `.is_null()` method --> css/src/macros.rs:622:20 | 622 | if res == core::ptr::null_mut() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `res.is_null()` | ::: css/src/props/layout/grid.rs:110:1 | 110 | impl_vec_mut!(GridTrackSizing, GridTrackSizingVec); | -------------------------------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: variables can be used directly in the `format!` string --> css/src/props/layout/grid.rs:258:34 | 258 | GridLine::Span(n) => format!("span {}", n), | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 258 - GridLine::Span(n) => format!("span {}", n), 258 + GridLine::Span(n) => format!("span {n}"), | warning: stripping a suffix manually --> css/src/props/layout/grid.rs:447:24 | 447 | let num_str = &input[..input.len() - 2].trim(); | ^^^^^^^^^^^^^^^^^^^^^^^^ | note: the suffix was tested here --> css/src/props/layout/grid.rs:444:5 | 444 | if input.ends_with("fr") { | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip help: try using the `strip_suffix` method | 444 ~ if let Some() = input.strip_suffix("fr") { 445 | /// Fr values are stored as integers scaled by this factor (e.g. `1fr` = 100, `0.5fr` = 50). 446 | const FR_SCALING_FACTOR: f32 = 100.0; 447 ~ let num_str = &.trim(); | warning: variables can be used directly in the `format!` string --> css/src/props/layout/grid.rs:837:39 | 837 | GridTrackSizing::Fr(f) => format!("GridTrackSizing::Fr({})", f), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 837 - GridTrackSizing::Fr(f) => format!("GridTrackSizing::Fr({})", f), 837 + GridTrackSizing::Fr(f) => format!("GridTrackSizing::Fr({f})"), | warning: parameter is only used in recursion --> css/src/props/layout/grid.rs:831:35 | 831 | fn format_as_rust_code(&self, tabs: usize) -> String { | ^^^^ help: if this is intentional, prefix it with an underscore: `_tabs` | note: parameter used here --> css/src/props/layout/grid.rs:844:52 | 844 | minmax.min.format_as_rust_code(tabs), | ^^^^ 845 | minmax.max.format_as_rust_code(tabs) | ^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion = note: `#[warn(clippy::only_used_in_recursion)]` implied by `#[warn(clippy::all)]` warning: stripping a prefix manually --> css/src/props/layout/grid.rs:892:24 | 892 | let num_str = &input[5..].trim(); | ^^^^^^^^^^ | note: the prefix was tested here --> css/src/props/layout/grid.rs:891:5 | 891 | if input.starts_with("span ") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip help: try using the `strip_prefix` method | 891 ~ if let Some() = input.strip_prefix("span ") { 892 ~ let num_str = &.trim(); | warning: comparing with null is better expressed by the `.is_null()` method --> css/src/macros.rs:622:20 | 622 | if res == core::ptr::null_mut() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `res.is_null()` | ::: css/src/props/layout/grid.rs:1192:1 | 1192 | impl_vec_mut!(GridAreaDefinition, GridAreaDefinitionVec); | -------------------------------------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: the loop variable `r` is used to index `grid` --> css/src/props/layout/grid.rs:1228:22 | 1228 | for r in (area.row_start as usize - 1)..(area.row_end as usize - 1) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop = note: `#[warn(clippy::needless_range_loop)]` implied by `#[warn(clippy::all)]` help: consider using an iterator and enumerate() | 1228 - for r in (area.row_start as usize - 1)..(area.row_end as usize - 1) { 1228 + for (r, ) in grid.iter_mut().enumerate().take((area.row_end as usize - 1)).skip((area.row_start as usize - 1)) { | warning: variables can be used directly in the `format!` string --> css/src/props/layout/overflow.rs:317:13 | 317 | format!("{} {}", edge, len) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 317 - format!("{} {}", edge, len) 317 + format!("{edge} {len}") | warning: variables can be used directly in the `format!` string --> css/src/props/layout/overflow.rs:464:28 | 464 | Some(v) => format!("{}px", v), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 464 - Some(v) => format!("{}px", v), 464 + Some(v) => format!("{v}px"), | warning: variables can be used directly in the `format!` string --> css/src/props/layout/position.rs:214:17 | 214 | format!("LayoutZIndex::Integer({})", val) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 214 - format!("LayoutZIndex::Integer({})", val) 214 + format!("LayoutZIndex::Integer({val})") | warning: variables can be used directly in the `format!` string --> css/src/props/layout/text.rs:56:17 | 56 | write!(f, "Invalid text-justify value: '{}'.", s) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 56 - write!(f, "Invalid text-justify value: '{}'.", s) 56 + write!(f, "Invalid text-justify value: '{s}'.") | warning: variables can be used directly in the `format!` string --> css/src/props/style/background.rs:206:13 | 206 | format!("{}, {}", dir_str, stops_str) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 206 - format!("{}, {}", dir_str, stops_str) 206 + format!("{dir_str}, {stops_str}") | warning: all variants have the same postfix: `Gradient` --> css/src/props/style/background.rs:1046:5 | 1046 | / enum GradientType { 1047 | | LinearGradient, 1048 | | RepeatingLinearGradient, 1049 | | RadialGradient, ... | 1052 | | RepeatingConicGradient, 1053 | | } | |_____^ | = help: remove the postfixes and use full paths to the variants instead of glob imports = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names = note: `#[warn(clippy::enum_variant_names)]` implied by `#[warn(clippy::all)]` warning: variables can be used directly in the `format!` string --> css/src/props/style/exclusion.rs:100:65 | 100 | StyleExclusionMarginParseErrorOwned::FloatValue(format!("{}", e).into()) | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 100 - StyleExclusionMarginParseErrorOwned::FloatValue(format!("{}", e).into()) 100 + StyleExclusionMarginParseErrorOwned::FloatValue(format!("{e}").into()) | warning: variables can be used directly in the `format!` string --> css/src/props/style/filter.rs:191:40 | 191 | StyleFilter::Opacity(c) => format!("opacity({})", c), | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 191 - StyleFilter::Opacity(c) => format!("opacity({})", c), 191 + StyleFilter::Opacity(c) => format!("opacity({c})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/filter.rs:196:30 | 196 | .map(|s| format!("{}", s)) | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 196 - .map(|s| format!("{}", s)) 196 + .map(|s| format!("{s}")) | warning: variables can be used directly in the `format!` string --> css/src/props/style/filter.rs:206:43 | 206 | StyleFilter::Brightness(v) => format!("brightness({})", v), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 206 - StyleFilter::Brightness(v) => format!("brightness({})", v), 206 + StyleFilter::Brightness(v) => format!("brightness({v})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/filter.rs:207:41 | 207 | StyleFilter::Contrast(v) => format!("contrast({})", v), | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 207 - StyleFilter::Contrast(v) => format!("contrast({})", v), 207 + StyleFilter::Contrast(v) => format!("contrast({v})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/filter.rs:208:42 | 208 | StyleFilter::Grayscale(v) => format!("grayscale({})", v), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 208 - StyleFilter::Grayscale(v) => format!("grayscale({})", v), 208 + StyleFilter::Grayscale(v) => format!("grayscale({v})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/filter.rs:209:42 | 209 | StyleFilter::HueRotate(a) => format!("hue-rotate({})", a), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 209 - StyleFilter::HueRotate(a) => format!("hue-rotate({})", a), 209 + StyleFilter::HueRotate(a) => format!("hue-rotate({a})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/filter.rs:210:39 | 210 | StyleFilter::Invert(v) => format!("invert({})", v), | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 210 - StyleFilter::Invert(v) => format!("invert({})", v), 210 + StyleFilter::Invert(v) => format!("invert({v})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/filter.rs:211:41 | 211 | StyleFilter::Saturate(v) => format!("saturate({})", v), | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 211 - StyleFilter::Saturate(v) => format!("saturate({})", v), 211 + StyleFilter::Saturate(v) => format!("saturate({v})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/filter.rs:212:38 | 212 | StyleFilter::Sepia(v) => format!("sepia({})", v), | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 212 - StyleFilter::Sepia(v) => format!("sepia({})", v), 212 + StyleFilter::Sepia(v) => format!("sepia({v})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/text.rs:601:46 | 601 | StyleVerticalAlign::Length(l) => format!("StyleVerticalAlign::Length({})", l), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 601 - StyleVerticalAlign::Length(l) => format!("StyleVerticalAlign::Length({})", l), 601 + StyleVerticalAlign::Length(l) => format!("StyleVerticalAlign::Length({l})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/text.rs:950:9 | 950 | format!("{:?}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 950 - format!("{:?}", self) 950 + format!("{self:?}") | warning: variables can be used directly in the `format!` string --> css/src/props/style/text.rs:1080:9 | 1080 | format!("{:?}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1080 - format!("{:?}", self) 1080 + format!("{self:?}") | warning: variables can be used directly in the `format!` string --> css/src/props/style/text.rs:1183:9 | 1183 | format!("{:?}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1183 - format!("{:?}", self) 1183 + format!("{self:?}") | warning: variables can be used directly in the `format!` string --> css/src/props/style/text.rs:1298:9 | 1298 | format!("{:?}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1298 - format!("{:?}", self) 1298 + format!("{self:?}") | warning: variables can be used directly in the `format!` string --> css/src/props/style/text.rs:1307:32 | 1307 | Self::Digits(n) => format!("digits {}", n), | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1307 - Self::Digits(n) => format!("digits {}", n), 1307 + Self::Digits(n) => format!("digits {n}"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:227:46 | 227 | StyleTransform::TranslateX(x) => format!("translateX({})", x), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 227 - StyleTransform::TranslateX(x) => format!("translateX({})", x), 227 + StyleTransform::TranslateX(x) => format!("translateX({x})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:228:46 | 228 | StyleTransform::TranslateY(y) => format!("translateY({})", y), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 228 - StyleTransform::TranslateY(y) => format!("translateY({})", y), 228 + StyleTransform::TranslateY(y) => format!("translateY({y})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:229:46 | 229 | StyleTransform::TranslateZ(z) => format!("translateZ({})", z), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 229 - StyleTransform::TranslateZ(z) => format!("translateZ({})", z), 229 + StyleTransform::TranslateZ(z) => format!("translateZ({z})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:230:42 | 230 | StyleTransform::Rotate(r) => format!("rotate({})", r), | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 230 - StyleTransform::Rotate(r) => format!("rotate({})", r), 230 + StyleTransform::Rotate(r) => format!("rotate({r})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:234:43 | 234 | StyleTransform::RotateX(x) => format!("rotateX({})", x), | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 234 - StyleTransform::RotateX(x) => format!("rotateX({})", x), 234 + StyleTransform::RotateX(x) => format!("rotateX({x})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:235:43 | 235 | StyleTransform::RotateY(y) => format!("rotateY({})", y), | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 235 - StyleTransform::RotateY(y) => format!("rotateY({})", y), 235 + StyleTransform::RotateY(y) => format!("rotateY({y})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:236:43 | 236 | StyleTransform::RotateZ(z) => format!("rotateZ({})", z), | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 236 - StyleTransform::RotateZ(z) => format!("rotateZ({})", z), 236 + StyleTransform::RotateZ(z) => format!("rotateZ({z})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:239:42 | 239 | StyleTransform::ScaleX(x) => format!("scaleX({})", x), | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 239 - StyleTransform::ScaleX(x) => format!("scaleX({})", x), 239 + StyleTransform::ScaleX(x) => format!("scaleX({x})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:240:42 | 240 | StyleTransform::ScaleY(y) => format!("scaleY({})", y), | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 240 - StyleTransform::ScaleY(y) => format!("scaleY({})", y), 240 + StyleTransform::ScaleY(y) => format!("scaleY({y})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:241:42 | 241 | StyleTransform::ScaleZ(z) => format!("scaleZ({})", z), | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 241 - StyleTransform::ScaleZ(z) => format!("scaleZ({})", z), 241 + StyleTransform::ScaleZ(z) => format!("scaleZ({z})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:243:41 | 243 | StyleTransform::SkewX(x) => format!("skewX({})", x), | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 243 - StyleTransform::SkewX(x) => format!("skewX({})", x), 243 + StyleTransform::SkewX(x) => format!("skewX({x})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:244:41 | 244 | StyleTransform::SkewY(y) => format!("skewY({})", y), | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 244 - StyleTransform::SkewY(y) => format!("skewY({})", y), 244 + StyleTransform::SkewY(y) => format!("skewY({y})"), | warning: variables can be used directly in the `format!` string --> css/src/props/style/transform.rs:245:50 | 245 | StyleTransform::Perspective(dist) => format!("perspective({})", dist), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 245 - StyleTransform::Perspective(dist) => format!("perspective({})", dist), 245 + StyleTransform::Perspective(dist) => format!("perspective({dist})"), | warning: variables can be used directly in the `format!` string --> css/src/props/property.rs:535:9 | 535 | write!(f, "{}", key) | ^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 535 - write!(f, "{}", key) 535 + write!(f, "{key}") | warning: match expression looks like `matches!` macro --> css/src/props/property.rs:1517:9 | 1517 | / match self { 1518 | | TextColor 1519 | | | Cursor 1520 | | | BackgroundContent ... | 1558 | | _ => true, 1559 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro = note: `#[warn(clippy::match_like_matches_macro)]` implied by `#[warn(clippy::all)]` help: try | 1517 ~ !matches!(self, TextColor 1518 + | Cursor 1519 + | BackgroundContent 1520 + | BackgroundPosition 1521 + | BackgroundSize 1522 + | BackgroundRepeat 1523 + | BorderTopLeftRadius 1524 + | BorderTopRightRadius 1525 + | BorderBottomLeftRadius 1526 + | BorderBottomRightRadius 1527 + | BorderTopColor 1528 + | BorderRightColor 1529 + | BorderLeftColor 1530 + | BorderBottomColor 1531 + | BorderTopStyle 1532 + | BorderRightStyle 1533 + | BorderLeftStyle 1534 + | BorderBottomStyle 1535 + | ColumnRuleColor 1536 + | ColumnRuleStyle 1537 + | BoxShadowLeft 1538 + | BoxShadowRight 1539 + | BoxShadowTop 1540 + | BoxShadowBottom 1541 + | BoxDecorationBreak 1542 + | ScrollbarTrack 1543 + | ScrollbarThumb 1544 + | ScrollbarButton 1545 + | ScrollbarCorner 1546 + | ScrollbarResizer 1547 + | Opacity 1548 + | Transform 1549 + | TransformOrigin 1550 + | PerspectiveOrigin 1551 + | BackfaceVisibility 1552 + | MixBlendMode 1553 + | Filter 1554 + | BackdropFilter 1555 + | TextShadow 1556 + | Clip) | warning: clamp-like pattern without using clamp function --> css/src/props/property.rs:4564:17 | 4564 | let t = t.max(0.0).min(1.0); | ^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `t.clamp(0.0, 1.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp = note: `#[warn(clippy::manual_clamp)]` implied by `#[warn(clippy::all)]` warning: variables can be used directly in the `format!` string --> css/src/props/property.rs:7725:35 | 7725 | CssPropertyValue::Auto => format!("{}Value::Auto", property_value_type), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 7725 - CssPropertyValue::Auto => format!("{}Value::Auto", property_value_type), 7725 + CssPropertyValue::Auto => format!("{property_value_type}Value::Auto"), | warning: variables can be used directly in the `format!` string --> css/src/props/property.rs:7726:35 | 7726 | CssPropertyValue::None => format!("{}Value::None", property_value_type), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 7726 - CssPropertyValue::None => format!("{}Value::None", property_value_type), 7726 + CssPropertyValue::None => format!("{property_value_type}Value::None"), | warning: variables can be used directly in the `format!` string --> css/src/props/property.rs:7727:38 | 7727 | CssPropertyValue::Initial => format!("{}Value::Initial", property_value_type), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 7727 - CssPropertyValue::Initial => format!("{}Value::Initial", property_value_type), 7727 + CssPropertyValue::Initial => format!("{property_value_type}Value::Initial"), | warning: variables can be used directly in the `format!` string --> css/src/props/property.rs:7728:38 | 7728 | CssPropertyValue::Inherit => format!("{}Value::Inherit", property_value_type), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 7728 - CssPropertyValue::Inherit => format!("{}Value::Inherit", property_value_type), 7728 + CssPropertyValue::Inherit => format!("{property_value_type}Value::Inherit"), | warning: variables can be used directly in the `format!` string --> css/src/props/property.rs:7729:37 | 7729 | CssPropertyValue::Revert => format!("{}Value::Revert", property_value_type), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 7729 - CssPropertyValue::Revert => format!("{}Value::Revert", property_value_type), 7729 + CssPropertyValue::Revert => format!("{property_value_type}Value::Revert"), | warning: variables can be used directly in the `format!` string --> css/src/props/property.rs:7730:36 | 7730 | CssPropertyValue::Unset => format!("{}Value::Unset", property_value_type), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 7730 - CssPropertyValue::Unset => format!("{}Value::Unset", property_value_type), 7730 + CssPropertyValue::Unset => format!("{property_value_type}Value::Unset"), | warning: you are implementing `Ord` explicitly but have derived `PartialOrd` --> css/src/shape.rs:39:1 | 39 | / impl Ord for ShapePoint { 40 | | fn cmp(&self, other: &Self) -> core::cmp::Ordering { 41 | | match self.x.partial_cmp(&other.x) { 42 | | Some(core::cmp::Ordering::Equal) => self ... | 49 | | } | |_^ | note: `PartialOrd` implemented here --> css/src/shape.rs:14:41 | 14 | #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)] | ^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord warning: variables can be used directly in the `format!` string --> css/src/shape.rs:300:28 | 300 | let base = format!("inset({}px {}px {}px {}px", inset_top, inset_right, inset_bottom, inset_left); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 300 - let base = format!("inset({}px {}px {}px {}px", inset_top, inset_right, inset_bottom, inset_left); 300 + let base = format!("inset({inset_top}px {inset_right}px {inset_bottom}px {inset_left}px"); | warning: variables can be used directly in the `format!` string --> css/src/shape.rs:302:43 | 302 | OptionF32::Some(r) => format!("{} round {}px)", base, r), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 302 - OptionF32::Some(r) => format!("{} round {}px)", base, r), 302 + OptionF32::Some(r) => format!("{base} round {r}px)"), | warning: variables can be used directly in the `format!` string --> css/src/shape.rs:303:40 | 303 | OptionF32::None => format!("{})", base), | ^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 303 - OptionF32::None => format!("{})", base), 303 + OptionF32::None => format!("{base})"), | warning: variables can be used directly in the `format!` string --> css/src/shape.rs:335:43 | 335 | OptionF32::Some(r) => format!("OptionF32::Some({}_f32)", r), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 335 - OptionF32::Some(r) => format!("OptionF32::Some({}_f32)", r), 335 + OptionF32::Some(r) => format!("OptionF32::Some({r}_f32)"), | warning: variables can be used directly in the `format!` string --> css/src/shape.rs:338:17 | 338 | / ... format!( 339 | | ... "CssShape::Inset(ShapeInset {{ inset_top: {}_f32, inset_right: {}_f32, inset_bottom: {}_f32, inset_left: {}_f32, border_radius:... 340 | | ... inset_top, inset_right, inset_bottom, inset_left, br 341 | | ... ) | |_______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> css/src/shape_parser.rs:31:17 | 31 | write!(f, "Unknown shape function: {}", func) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 31 - write!(f, "Unknown shape function: {}", func) 31 + write!(f, "Unknown shape function: {func}") | warning: variables can be used directly in the `format!` string --> css/src/shape_parser.rs:34:17 | 34 | write!(f, "Missing required parameter: {}", param) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 34 - write!(f, "Missing required parameter: {}", param) 34 + write!(f, "Missing required parameter: {param}") | warning: variables can be used directly in the `format!` string --> css/src/shape_parser.rs:37:17 | 37 | write!(f, "Invalid numeric value: {}", num) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 37 - write!(f, "Invalid numeric value: {}", num) 37 + write!(f, "Invalid numeric value: {num}") | warning: variables can be used directly in the `format!` string --> css/src/shape_parser.rs:40:17 | 40 | write!(f, "Invalid syntax: {}", msg) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 40 - write!(f, "Invalid syntax: {}", msg) 40 + write!(f, "Invalid syntax: {msg}") | warning: variables can be used directly in the `format!` string --> css/src/shape_parser.rs:182:55 | 182 | return Err(ShapeParseError::InvalidSyntax(format!( | _______________________________________________________^ 183 | | "Expected x y pair, got: {}", 184 | | pair 185 | | ))); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: this `impl` can be derived --> css/src/system.rs:64:1 | 64 | / impl Default for RicingMode { 65 | | fn default() -> Self { RicingMode::Default } 66 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 51 + #[derive(Default)] 52 ~ pub enum RicingMode { 53 | /// `AZ_RICING=off` (or `disabled` / `none` / `0`). Skip the user ... 57 | /// (`KDE > GNOME > riced > defaults` on Linux). 58 ~ #[default] 59 ~ Default, | warning: variables can be used directly in the `format!` string --> css/src/system.rs:1295:28 | 1295 | Some(v) => format!("{:.2}", v), | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1295 - Some(v) => format!("{:.2}", v), 1295 + Some(v) => format!("{v:.2}"), | warning: variables can be used directly in the `format!` string --> css/src/system.rs:1301:28 | 1301 | Some(v) => format!("{}", v), | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1301 - Some(v) => format!("{}", v), 1301 + Some(v) => format!("{v}"), | warning: `azul-css` (lib) generated 156 warnings (run `cargo clippy --fix --lib -p azul-css` to apply 129 suggestions) Checking azul-core v0.0.8 (/home/runner/work/azul/azul/core) warning: unknown lint: `mismatched_lifetime_syntaxes` --> core/src/lib.rs:31:5 | 31 | mismatched_lifetime_syntaxes, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unknown_lints)]` on by default warning: bound is defined in more than one place --> core/src/id.rs:397:47 | 397 | pub fn transform_nodeid_optional( | ^ ... 402 | F: Fn(NodeId) -> Option, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations note: the lint level is defined here --> core/src/lib.rs:15:9 | 15 | #![warn(clippy::all)] | ^^^^^^^^^^^ = note: `#[warn(clippy::multiple_bound_locations)]` implied by `#[warn(clippy::all)]` warning: elided lifetime has a name --> core/src/prop_cache.rs:1870:17 | 1864 | pub fn get_property<'a>( | -- lifetime `'a` declared here ... 1870 | ) -> Option<&CssProperty> { | ^ this elided lifetime gets resolved as `'a` | = note: `#[warn(elided_named_lifetimes)]` on by default warning: elided lifetime has a name --> core/src/prop_cache.rs:1941:17 | 1935 | pub(crate) fn get_property_slow<'a>( | -- lifetime `'a` declared here ... 1941 | ) -> Option<&CssProperty> { | ^ this elided lifetime gets resolved as `'a` warning: elided lifetime has a name --> core/src/prop_cache.rs:2199:17 | 2193 | pub(crate) fn get_property_with_context<'a>( | -- lifetime `'a` declared here ... 2199 | ) -> Option<&CssProperty> { | ^ this elided lifetime gets resolved as `'a` warning: this `impl` can be derived --> core/src/debug.rs:26:1 | 26 | / impl Default for DebugLevel { 27 | | fn default() -> Self { 28 | | DebugLevel::Debug 29 | | } 30 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `#[warn(clippy::derivable_impls)]` implied by `#[warn(clippy::all)]` help: replace the manual implementation with a derive attribute and mark the default variant | 13 + #[derive(Default)] 14 ~ pub enum DebugLevel { 15 | /// Very detailed tracing information 16 | Trace, 17 | /// Debugging information 18 ~ #[default] 19 ~ Debug, | warning: this `impl` can be derived --> core/src/debug.rs:68:1 | 68 | / impl Default for DebugCategory { 69 | | fn default() -> Self { 70 | | DebugCategory::General 71 | | } 72 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 35 + #[derive(Default)] 36 ~ pub enum DebugCategory { 37 | /// General/uncategorized 38 ~ #[default] 39 ~ General, | warning: this `if` has identical blocks --> core/src/callbacks.rs:89:69 | 89 | if *self == Update::DoNothing && other != Update::DoNothing { | _____________________________________________________________________^ 90 | | *self = other; 91 | | } else if *self == Update::RefreshDom && other == Update::RefreshDomAllWindows { | |_________^ | note: same as this --> core/src/callbacks.rs:91:88 | 91 | } else if *self == Update::RefreshDom && other == Update::RefreshDomAllWindows { | ________________________________________________________________________________________^ 92 | | *self = other; 93 | | } | |_________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else = note: `#[warn(clippy::if_same_then_else)]` implied by `#[warn(clippy::all)]` warning: the following explicit lifetimes could be elided: 'a --> core/src/callbacks.rs:317:34 | 317 | fn internal_get_system_fonts<'a>(&'a self) -> &'a FcFontCache { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` implied by `#[warn(clippy::all)]` help: elide the lifetimes | 317 - fn internal_get_system_fonts<'a>(&'a self) -> &'a FcFontCache { 317 + fn internal_get_system_fonts(&self) -> &FcFontCache { | warning: the following explicit lifetimes could be elided: 'a --> core/src/callbacks.rs:320:33 | 320 | fn internal_get_image_cache<'a>(&'a self) -> &'a ImageCache { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 320 - fn internal_get_image_cache<'a>(&'a self) -> &'a ImageCache { 320 + fn internal_get_image_cache(&self) -> &ImageCache { | warning: this `impl` can be derived --> core/src/callbacks.rs:565:1 | 565 | / impl Default for RelayoutReason { 566 | | fn default() -> Self { RelayoutReason::Initial } 567 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 546 + #[derive(Default)] 547 ~ pub enum RelayoutReason { 548 | /// First layout call for this window. 549 ~ #[default] 550 ~ Initial, | warning: casting raw pointers to the same type and constness is unnecessary (`*const callbacks::LayoutCallbackInfoRefData<'_>` -> `*const callbacks::LayoutCallbackInfoRefData<'_>`) --> core/src/callbacks.rs:630:23 | 630 | ref_data: ref_data as *const LayoutCallbackInfoRefData<'a> | _______________________^ 631 | | as *const LayoutCallbackInfoRefData<'static>, | |____________________________________________________________^ help: try: `ref_data as *const LayoutCallbackInfoRefData<'a>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` implied by `#[warn(clippy::all)]` warning: the following explicit lifetimes could be elided: 'a --> core/src/callbacks.rs:664:33 | 664 | fn internal_get_image_cache<'a>(&'a self) -> &'a ImageCache { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 664 - fn internal_get_image_cache<'a>(&'a self) -> &'a ImageCache { 664 + fn internal_get_image_cache(&self) -> &ImageCache { | warning: the following explicit lifetimes could be elided: 'a --> core/src/callbacks.rs:667:34 | 667 | fn internal_get_system_fonts<'a>(&'a self) -> &'a FcFontCache { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 667 - fn internal_get_system_fonts<'a>(&'a self) -> &'a FcFontCache { 667 + fn internal_get_system_fonts(&self) -> &FcFontCache { | warning: the following explicit lifetimes could be elided: 'a --> core/src/callbacks.rs:670:32 | 670 | fn internal_get_gl_context<'a>(&'a self) -> &'a OptionGlContextPtr { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 670 - fn internal_get_gl_context<'a>(&'a self) -> &'a OptionGlContextPtr { 670 + fn internal_get_gl_context(&self) -> &OptionGlContextPtr { | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/callbacks.rs:903:1 | 903 | impl_vec_mut!(CoreCallbackData, CoreCallbackDataVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: `#[warn(clippy::cmp_null)]` implied by `#[warn(clippy::all)]` = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: this public function might dereference a raw pointer but is not marked `unsafe` --> core/src/host_invoker.rs:264:24 | 264 | let r = unsafe { &*refany }; | ^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref = note: `#[warn(clippy::not_unsafe_ptr_arg_deref)]` implied by `#[warn(clippy::all)]` warning: variables can be used directly in the `format!` string --> core/src/a11y.rs:889:58 | 889 | OptionF32::Some(v) => OptionString::Some(format!("{}", v).into()), | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args = note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::all)]` help: change this to | 889 - OptionF32::Some(v) => OptionString::Some(format!("{}", v).into()), 889 + OptionF32::Some(v) => OptionString::Some(format!("{v}").into()), | warning: this `impl` can be derived --> core/src/biometric.rs:40:1 | 40 | / impl Default for BiometricKind { 41 | | fn default() -> Self { 42 | | BiometricKind::NotAvailable 43 | | } 44 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 28 + #[derive(Default)] 29 ~ pub enum BiometricKind { 30 | /// No usable biometric sensor (absent, unenrolled, or disabled). 31 ~ #[default] 32 ~ NotAvailable, | warning: the loop variable `i` is used to index `node_data` --> core/src/compact.rs:46:18 | 46 | for i in 0..node_count { | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop = note: `#[warn(clippy::needless_range_loop)]` implied by `#[warn(clippy::all)]` help: consider using an iterator and enumerate() | 46 - for i in 0..node_count { 46 + for (i, ) in node_data.iter().enumerate().take(node_count) { | warning: this `impl` can be derived --> core/src/diff.rs:156:1 | 156 | / impl Default for ExtendedDiffResult { 157 | | fn default() -> Self { 158 | | Self { 159 | | diff: DiffResult::default(), ... | 163 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute | 147 + #[derive(Default)] 148 ~ pub struct ExtendedDiffResult { | warning: this `impl` can be derived --> core/src/diff.rs:423:1 | 423 | / impl Default for DiffResult { 424 | | fn default() -> Self { 425 | | Self { 426 | | events: Vec::new(), ... | 430 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute | 416 + #[derive(Default)] 417 ~ pub struct DiffResult { | warning: this `impl` can be derived --> core/src/diff.rs:1424:1 | 1424 | / impl Default for NodeDataFingerprint { 1425 | | fn default() -> Self { 1426 | | Self { 1427 | | content_hash: 0, ... | 1435 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute | 1409 + #[derive(Default)] 1410 ~ pub struct NodeDataFingerprint { | warning: variables can be used directly in the `format!` string --> core/src/dom.rs:199:9 | 199 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 199 - write!(f, "{}", self) 199 + write!(f, "{self}") | warning: methods called `into_*` usually take `self` by value --> core/src/dom.rs:650:36 | 650 | fn into_library_owned_nodetype(&self) -> Self { | ^^^^^ | = help: consider choosing a less ambiguous name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention = note: `#[warn(clippy::wrong_self_convention)]` implied by `#[warn(clippy::all)]` warning: variables can be used directly in the `format!` string --> core/src/dom.rs:825:29 | 825 | Text(s) => Some(format!("{}", s)), | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 825 - Text(s) => Some(format!("{}", s)), 825 + Text(s) => Some(format!("{s}")), | warning: variables can be used directly in the `format!` string --> core/src/dom.rs:826:31 | 826 | Image(id) => Some(format!("image({:?})", id)), | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 826 - Image(id) => Some(format!("image({:?})", id)), 826 + Image(id) => Some(format!("image({id:?})")), | warning: variables can be used directly in the `format!` string --> core/src/dom.rs:828:29 | 828 | Icon(s) => Some(format!("icon({})", s)), | ^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 828 - Icon(s) => Some(format!("icon({})", s)), 828 + Icon(s) => Some(format!("icon({s})")), | warning: you are implementing `Ord` explicitly but have derived `PartialOrd` --> core/src/dom.rs:1687:1 | 1687 | / impl Ord for SvgNodeData { 1688 | | fn cmp(&self, other: &Self) -> core::cmp::Ordering { 1689 | | self.partial_cmp(other).unwrap_or(core::cmp::Ordering::Equal) 1690 | | } 1691 | | } | |_^ | note: `PartialOrd` implemented here --> core/src/dom.rs:1655:35 | 1655 | #[derive(Debug, Clone, PartialEq, PartialOrd)] | ^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord = note: `#[warn(clippy::derive_ord_xor_partial_ord)]` implied by `#[warn(clippy::all)]` warning: comparing with null is better expressed by the `.is_null()` method --> core/src/dom.rs:1907:1 | 1907 | impl_vec_mut!(NodeData, NodeDataVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: this `impl` can be derived --> core/src/dom.rs:1975:1 | 1975 | / impl Default for TabIndex { 1976 | | fn default() -> Self { 1977 | | TabIndex::Auto 1978 | | } 1979 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 1939 + #[derive(Default)] 1940 ~ pub enum TabIndex { 1941 | /// Automatic tab index, similar to simply setting `focusable = "true"` or `tabindex = 0` ... 1945 | /// for interesting notes on tabindex and accessibility 1946 ~ #[default] 1947 ~ Auto, | warning: this `impl` can be derived --> core/src/dom.rs:1998:1 | 1998 | / impl Default for NodeFlags { 1999 | | fn default() -> Self { 2000 | | NodeFlags { inner: 0 } 2001 | | } 2002 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute | 1994 + #[derive(Default)] 1995 ~ pub struct NodeFlags { | warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/dom.rs:2094:53 | 2094 | let attributes_string = node_data_to_string(&self); | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` implied by `#[warn(clippy::all)]` warning: variables can be used directly in the `format!` string --> core/src/dom.rs:2097:30 | 2097 | Some(content) => write!( | ______________________________^ 2098 | | f, 2099 | | "<{}{}>{}", 2100 | | html_type, attributes_string, content, html_type 2101 | | ), | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/dom.rs:2102:21 | 2102 | None => write!(f, "<{}{}/>", html_type, attributes_string), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 2102 - None => write!(f, "<{}{}/>", html_type, attributes_string), 2102 + None => write!(f, "<{html_type}{attributes_string}/>"), | warning: variables can be used directly in the `format!` string --> core/src/dom.rs:2118:21 | 2118 | id_string = format!(" id=\"{}\" ", ids); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 2118 - id_string = format!(" id=\"{}\" ", ids); 2118 + id_string = format!(" id=\"{ids}\" "); | warning: variables can be used directly in the `format!` string --> core/src/dom.rs:2131:24 | 2131 | class_string = format!(" class=\"{}\" ", classes); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 2131 - class_string = format!(" class=\"{}\" ", classes); 2131 + class_string = format!(" class=\"{classes}\" "); | warning: variables can be used directly in the `format!` string --> core/src/dom.rs:2139:5 | 2139 | format!("{}{}{}", id_string, class_string, tabindex_string) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 2139 - format!("{}{}{}", id_string, class_string, tabindex_string) 2139 + format!("{id_string}{class_string}{tabindex_string}") | warning: you seem to be trying to use `&Box`. Consider using just `&T` --> core/src/dom.rs:2456:52 | 2456 | pub fn get_accessibility_info(&self) -> Option<&Box> { | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&AccessibilityInfo` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box = note: `#[warn(clippy::borrowed_box)]` implied by `#[warn(clippy::all)]` warning: you seem to be trying to use `&Box`. Consider using just `&T` --> core/src/dom.rs:2460:42 | 2460 | pub fn get_menu_bar(&self) -> Option<&Box> { | ^^^^^^^^^^ help: try: `&Menu` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box warning: you seem to be trying to use `&Box`. Consider using just `&T` --> core/src/dom.rs:2464:46 | 2464 | pub fn get_context_menu(&self) -> Option<&Box> { | ^^^^^^^^^^ help: try: `&Menu` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` --> core/src/dom.rs:3116:13 | 3116 | / match attr { 3117 | | AttributeType::AriaLabel(s) => return Some(s.as_str()), 3118 | | _ => {} 3119 | | } | |_____________^ help: try: `if let AttributeType::AriaLabel(s) = attr { return Some(s.as_str()) }` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match = note: `#[warn(clippy::single_match)]` implied by `#[warn(clippy::all)]` warning: the following explicit lifetimes could be elided: 'a --> core/src/dom.rs:3161:43 | 3161 | pub fn get_render_image_callback_node<'a>( | ^^ 3162 | &'a mut self, | ^^ 3163 | ) -> Option<(&'a mut CoreImageCallback, ImageRefHash)> { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 3161 ~ pub fn get_render_image_callback_node( 3162 ~ &mut self, 3163 ~ ) -> Option<(&mut CoreImageCallback, ImageRefHash)> { | warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/dom.rs:3180:53 | 3180 | let attributes_string = node_data_to_string(&self); | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/dom.rs:3181:61 | 3181 | let style = css_cache.get_computed_css_style_string(&self, node_id, node_state); | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: variables can be used directly in the `format!` string --> core/src/dom.rs:3197:9 | 3197 | format!("", html_type) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3197 - format!("", html_type) 3197 + format!("") | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/dom.rs:3327:1 | 3327 | impl_vec_mut!(CssWithNodeId, CssWithNodeIdVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: you are implementing `Ord` explicitly but have derived `PartialOrd` --> core/src/dom.rs:3361:1 | 3361 | / impl Ord for Dom { 3362 | | fn cmp(&self, other: &Self) -> core::cmp::Ordering { 3363 | | self.root.cmp(&other.root) 3364 | | .then_with(|| self.children.cmp(&other.children)) ... | 3367 | | } | |_^ | note: `PartialOrd` implemented here --> core/src/dom.rs:3296:28 | 3296 | #[derive(PartialEq, Clone, PartialOrd)] | ^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord warning: comparing with null is better expressed by the `.is_null()` method --> core/src/dom.rs:3378:1 | 3378 | impl_vec_mut!(Dom, DomVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: unneeded `return` statement --> core/src/dom.rs:5922:9 | 5922 | return self.estimated_total_children; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` implied by `#[warn(clippy::all)]` help: remove `return` | 5922 - return self.estimated_total_children; 5922 + self.estimated_total_children | warning: using `map` over `inspect` --> core/src/dom.rs:5931:14 | 5931 | .map(|c| { | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect = note: `#[warn(clippy::manual_inspect)]` implied by `#[warn(clippy::all)]` help: try | 5931 ~ .inspect(|c| { 5932 ~ estimated_total_children += c.estimated_total_children + 1; | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/drag.rs:279:1 | 279 | impl_vec_mut!(MimeTypeData, MimeTypeDataVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: using `clone` on type `HitTestItem` which implements the `Copy` trait --> core/src/events.rs:73:37 | 73 | hit_test_item: Some(item.clone()), | ^^^^^^^^^^^^ help: try dereferencing it: `*item` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `#[warn(clippy::clone_on_copy)]` implied by `#[warn(clippy::all)]` warning: using `clone` on type `EventFilter` which implements the `Copy` trait --> core/src/events.rs:74:31 | 74 | event_filter: event_filter.clone(), | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `event_filter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: this `impl` can be derived --> core/src/events.rs:164:1 | 164 | / impl Default for EventPhase { 165 | | fn default() -> Self { 166 | | EventPhase::Bubble 167 | | } 168 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 155 + #[derive(Default)] 156 ~ pub enum EventPhase { 157 | /// Event travels from root down to target ... 161 | /// Event bubbles from target back up to root 162 ~ #[default] 163 ~ Bubble, | warning: this `impl` can be derived --> core/src/events.rs:915:1 | 915 | / impl Default for PropagationResult { 916 | | fn default() -> Self { 917 | | Self { 918 | | callbacks_to_invoke: Vec::new(), ... | 922 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute | 767 + #[derive(Default)] 768 ~ pub struct PropagationResult { | warning: match expression looks like `matches!` macro --> core/src/events.rs:2165:9 | 2165 | / match self { 2166 | | EventFilter::Focus(_) => true, 2167 | | _ => false, 2168 | | } | |_________^ help: try: `matches!(self, EventFilter::Focus(_))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro = note: `#[warn(clippy::match_like_matches_macro)]` implied by `#[warn(clippy::all)]` warning: match expression looks like `matches!` macro --> core/src/events.rs:2171:9 | 2171 | / match self { 2172 | | EventFilter::Window(_) => true, 2173 | | _ => false, 2174 | | } | |_________^ help: try: `matches!(self, EventFilter::Window(_))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro warning: this public function might dereference a raw pointer but is not marked `unsafe` --> core/src/events.rs:2861:27 | 2861 | let info = unsafe { &*info_ptr }; | ^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref warning: you are implementing `Ord` explicitly but have derived `PartialOrd` --> core/src/geom.rs:205:1 | 205 | / impl Ord for LogicalPosition { 206 | | fn cmp(&self, other: &LogicalPosition) -> Ordering { 207 | | let self_x = (self.x * DECIMAL_MULTIPLIER) as isize; 208 | | let self_y = (self.y * DECIMAL_MULTIPLIER) as isize; ... | 213 | | } | |_^ | note: `PartialOrd` implemented here --> core/src/geom.rs:130:43 | 130 | #[derive(Default, Copy, Clone, PartialEq, PartialOrd)] | ^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord warning: you are implementing `Ord` explicitly but have derived `PartialOrd` --> core/src/geom.rs:304:1 | 304 | / impl Ord for LogicalSize { 305 | | fn cmp(&self, other: &LogicalSize) -> Ordering { 306 | | let self_width = (self.width * DECIMAL_MULTIPLIER) as isize; 307 | | let self_height = (self.height * DECIMAL_MULTIPLIER) as isize; ... | 314 | | } | |_^ | note: `PartialOrd` implemented here --> core/src/geom.rs:256:43 | 256 | #[derive(Default, Copy, Clone, PartialEq, PartialOrd)] | ^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord warning: casting raw pointers to the same type and constness is unnecessary (`*const gl_context_loader::c_void` -> `*const gl_context_loader::c_void`) --> core/src/gl.rs:701:18 | 701 | ptr: p as *const c_void, | ^^^^^^^^^^^^^^^^^^ help: try: `p` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast warning: redundant closure --> core/src/gl.rs:756:29 | 756 | .or_insert_with(|| OrderedMap::new()); | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `OrderedMap::new` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` implied by `#[warn(clippy::all)]` warning: redundant closure --> core/src/gl.rs:759:29 | 759 | .or_insert_with(|| OrderedMap::new()); | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `OrderedMap::new` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure warning: using `clone` on type `RendererType` which implements the `Copy` trait --> core/src/gl.rs:873:28 | 873 | renderer_type: self.renderer_type.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.renderer_type` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: variables can be used directly in the `format!` string --> core/src/gl.rs:1088:13 | 1088 | eprintln!("azul: {} shader compile error: {}", _label, log); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1088 - eprintln!("azul: {} shader compile error: {}", _label, log); 1088 + eprintln!("azul: {_label} shader compile error: {log}"); | warning: variables can be used directly in the `format!` string --> core/src/gl.rs:1102:13 | 1102 | eprintln!("azul: {} program link error: {}", _label, log); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1102 - eprintln!("azul: {} program link error: {}", _label, log); 1102 + eprintln!("azul: {_label} program link error: {log}"); | warning: useless conversion to the same type: `&str` --> core/src/gl.rs:1155:53 | 1155 | gl_context.bind_attrib_location(prog, *loc, (*name).into()); | ^^^^^^^^^^^^^^ help: consider removing `.into()`: `(*name)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` implied by `#[warn(clippy::all)]` warning: variables can be used directly in the `format!` string --> core/src/gl.rs:1236:25 | 1236 | / eprintln!( 1237 | | "azul: GL context UNUSABLE -- no GLSL version ({:?}) compiled the SVG \ 1238 | | shaders; the window should fall back to CPU rendering (is_gl_usable()=false)", 1239 | | gl_type 1240 | | ); | |_________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: the following explicit lifetimes could be elided: 'a --> core/src/gl.rs:1266:16 | 1266 | pub fn get<'a>(&'a self) -> &'a Rc { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 1266 - pub fn get<'a>(&'a self) -> &'a Rc { 1266 + pub fn get(&self) -> &Rc { | warning: using `clone` on type `u32` which implements the `Copy` trait --> core/src/gl.rs:2723:25 | 2723 | texture_id: self.texture_id.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.texture_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `PhysicalSize` which implements the `Copy` trait --> core/src/gl.rs:2725:19 | 2725 | size: self.size.clone(), | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `RawImageFormat` which implements the `Copy` trait --> core/src/gl.rs:2726:21 | 2726 | format: self.format.clone(), | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.format` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `ColorU` which implements the `Copy` trait --> core/src/gl.rs:2727:31 | 2727 | background_color: self.background_color.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.background_color` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `TextureFlags` which implements the `Copy` trait --> core/src/gl.rs:2728:20 | 2728 | flags: self.flags.clone(), | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.flags` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable --> core/src/gl.rs:3058:49 | 3058 | if prog == 0 || self.texture_id == 0 || !(brush.radius > 0.0) || tw <= 0.0 || th <= 0.0 { | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_cmp_op_on_partial_ord = note: `#[warn(clippy::neg_cmp_op_on_partial_ord)]` implied by `#[warn(clippy::all)]` warning: clamp-like pattern without using clamp function --> core/src/gl.rs:3087:50 | 3087 | let a = (brush.color.a as f32 / 255.0) * brush.flow.max(0.0).min(1.0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `brush.flow.clamp(0.0, 1.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp = note: `#[warn(clippy::manual_clamp)]` implied by `#[warn(clippy::all)]` warning: useless conversion to the same type: `&str` --> core/src/gl.rs:3241:58 | 3241 | .get_attrib_location(program_id, vertex_attribute.va_name.as_str().into()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `vertex_attribute.va_name.as_str()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion warning: useless conversion to the same type: `&str` --> core/src/gl.rs:3266:58 | 3266 | .get_attrib_location(program_id, vertex_attribute.va_name.as_str().into()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `vertex_attribute.va_name.as_str()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion warning: using `clone` on type `u32` which implements the `Copy` trait --> core/src/gl.rs:3425:31 | 3425 | vertex_buffer_id: self.vertex_buffer_id.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.vertex_buffer_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `usize` which implements the `Copy` trait --> core/src/gl.rs:3426:32 | 3426 | vertex_buffer_len: self.vertex_buffer_len.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.vertex_buffer_len` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `u32` which implements the `Copy` trait --> core/src/gl.rs:3427:30 | 3427 | index_buffer_id: self.index_buffer_id.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.index_buffer_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `usize` which implements the `Copy` trait --> core/src/gl.rs:3428:31 | 3428 | index_buffer_len: self.index_buffer_len.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.index_buffer_len` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `IndexBufferFormat` which implements the `Copy` trait --> core/src/gl.rs:3430:34 | 3430 | index_buffer_format: self.index_buffer_format.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.index_buffer_format` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: manual slice size calculation --> core/src/gl.rs:3482:13 | 3482 | (mem::size_of::() * vertices.len()) as isize, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(vertices)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation = note: `#[warn(clippy::manual_slice_size_calculation)]` implied by `#[warn(clippy::all)]` warning: manual slice size calculation --> core/src/gl.rs:3494:13 | 3494 | (mem::size_of::() * indices.len()) as isize, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(indices)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation warning: variables can be used directly in the `format!` string --> core/src/gl.rs:3724:33 | 3724 | Vertex(vert_err) => write!(f, "Failed to compile vertex shader: {}", vert_err), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3724 - Vertex(vert_err) => write!(f, "Failed to compile vertex shader: {}", vert_err), 3724 + Vertex(vert_err) => write!(f, "Failed to compile vertex shader: {vert_err}"), | warning: variables can be used directly in the `format!` string --> core/src/gl.rs:3725:35 | 3725 | Fragment(frag_err) => write!(f, "Failed to compile fragment shader: {}", frag_err), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3725 - Fragment(frag_err) => write!(f, "Failed to compile fragment shader: {}", frag_err), 3725 + Fragment(frag_err) => write!(f, "Failed to compile fragment shader: {frag_err}"), | warning: variables can be used directly in the `format!` string --> core/src/gl.rs:3732:9 | 3732 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3732 - write!(f, "{}", self) 3732 + write!(f, "{self}") | warning: variables can be used directly in the `format!` string --> core/src/gl.rs:3762:37 | 3762 | Compile(compile_err) => write!(f, "Shader compile error: {}", compile_err), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3762 - Compile(compile_err) => write!(f, "Shader compile error: {}", compile_err), 3762 + Compile(compile_err) => write!(f, "Shader compile error: {compile_err}"), | warning: variables can be used directly in the `format!` string --> core/src/gl.rs:3763:31 | 3763 | Link(link_err) => write!(f, "Shader linking error: {}", link_err), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3763 - Link(link_err) => write!(f, "Shader linking error: {}", link_err), 3763 + Link(link_err) => write!(f, "Shader linking error: {link_err}"), | warning: variables can be used directly in the `format!` string --> core/src/gl.rs:3773:9 | 3773 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3773 - write!(f, "{}", self) 3773 + write!(f, "{self}") | warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/gl.rs:3808:53 | 3808 | if let Some(error_id) = get_gl_shader_error(&gl_context, vertex_shader_object) { | ^^^^^^^^^^^ help: change this to: `gl_context` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: useless conversion to the same type: `azul_css::AzString` --> core/src/gl.rs:3814:31 | 3814 | info_log: info_log.into(), | ^^^^^^^^^^^^^^^ help: consider removing `.into()`: `info_log` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/gl.rs:3828:53 | 3828 | if let Some(error_id) = get_gl_shader_error(&gl_context, fragment_shader_object) { | ^^^^^^^^^^^ help: change this to: `gl_context` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: useless conversion to the same type: `azul_css::AzString` --> core/src/gl.rs:3835:31 | 3835 | info_log: info_log.into(), | ^^^^^^^^^^^^^^^ help: consider removing `.into()`: `info_log` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/gl.rs:3847:54 | 3847 | if let Some(error_id) = get_gl_program_error(&gl_context, program_id) { | ^^^^^^^^^^^ help: change this to: `gl_context` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: useless conversion to the same type: `azul_css::AzString` --> core/src/gl.rs:3854:27 | 3854 | info_log: info_log.into(), | ^^^^^^^^^^^^^^^ help: consider removing `.into()`: `info_log` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion warning: variables can be used directly in the `format!` string --> core/src/gl.rs:3973:21 | 3973 | println!("glFramebufferStatus returned unknown return code: {}", o); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3973 - println!("glFramebufferStatus returned unknown return code: {}", o); 3973 + println!("glFramebufferStatus returned unknown return code: {o}"); | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/gl.rs:3985:16 | 3985 | if gl.glPrimitiveRestartIndex != core::ptr::null_mut() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `gl.glPrimitiveRestartIndex.is_null()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null warning: useless conversion to the same type: `&str` --> core/src/gl.rs:4005:29 | 4005 | ... uniform.uniform_name.as_str().into(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `uniform.uniform_name.as_str()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion warning: unnecessary use of `get(&node_id).is_none()` --> core/src/gpu.rs:145:70 | 145 | ... || self.css_current_transform_values.get(&node_id).is_none()) | ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^ | | | help: replace it with: `!self.css_current_transform_values.contains_key(&node_id)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check = note: `#[warn(clippy::unnecessary_get_then_check)]` implied by `#[warn(clippy::all)]` warning: this block may be rewritten with the `?` operator --> core/src/gpu.rs:241:29 | 241 | / ... if self.current_opacity_values.get(&node_id).is_none() { 242 | | ... return None; 243 | | ... } | |_______________________^ help: replace it with: `self.current_opacity_values.get(&node_id)?;` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark = note: `#[warn(clippy::question_mark)]` implied by `#[warn(clippy::all)]` warning: unnecessary use of `get(&node_id).is_none()` --> core/src/gpu.rs:241:60 | 241 | ... if self.current_opacity_values.get(&node_id).is_none() { | ----------------------------^^^^^^^^^^^^^^^^^^^^^^^ | | | help: replace it with: `!self.current_opacity_values.contains_key(&node_id)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check warning: use of `extend` instead of `append` for adding the full range of a second vector --> core/src/gpu.rs:363:9 | 363 | / self.transform_key_changes 364 | | .extend(other.transform_key_changes.drain(..)); | |__________________________________________________________^ help: try: `self.transform_key_changes.append(&mut other.transform_key_changes)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain = note: `#[warn(clippy::extend_with_drain)]` implied by `#[warn(clippy::all)]` warning: use of `extend` instead of `append` for adding the full range of a second vector --> core/src/gpu.rs:365:9 | 365 | / self.opacity_key_changes 366 | | .extend(other.opacity_key_changes.drain(..)); | |________________________________________________________^ help: try: `self.opacity_key_changes.append(&mut other.opacity_key_changes)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain warning: use of `extend` instead of `append` for adding the full range of a second vector --> core/src/gpu.rs:367:9 | 367 | / self.scrollbar_opacity_changes 368 | | .extend(other.scrollbar_opacity_changes.drain(..)); | |______________________________________________________________^ help: try: `self.scrollbar_opacity_changes.append(&mut other.scrollbar_opacity_changes)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain warning: variables can be used directly in the `format!` string --> core/src/hit_test.rs:92:9 | 92 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 92 - write!(f, "{}", self) 92 + write!(f, "{self}") | warning: variables can be used directly in the `format!` string --> core/src/hit_test.rs:157:9 | 157 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 157 - write!(f, "{}", self) 157 + write!(f, "{self}") | warning: variables can be used directly in the `format!` string --> core/src/hit_test.rs:173:9 | 173 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 173 - write!(f, "{}", self) 173 + write!(f, "{self}") | warning: you should consider adding a `Default` implementation for `PipelineId` --> core/src/hit_test.rs:182:5 | 182 | / pub fn new() -> Self { 183 | | PipelineId( 184 | | LAST_PIPELINE_ID.fetch_add(1, AtomicOrdering::SeqCst), 185 | | 0, 186 | | ) 187 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` implied by `#[warn(clippy::all)]` help: try adding this | 179 + impl Default for PipelineId { 180 + fn default() -> Self { 181 + Self::new() 182 + } 183 + } | warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/hit_test.rs:234:20 | 234 | self.0.get(&scroll_id).map(|entry| entry.get()) | ^^^^^^^^^^ help: change this to: `scroll_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: variables can be used directly in the `format!` string --> core/src/icon.rs:318:26 | 318 | let mut result = format!("Debug lookup for icon '{}' (normalized: '{}'):\n", icon_name, icon_name_lower); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 318 - let mut result = format!("Debug lookup for icon '{}' (normalized: '{}'):\n", icon_name, icon_name_lower); 318 + let mut result = format!("Debug lookup for icon '{icon_name}' (normalized: '{icon_name_lower}'):\n"); | warning: variables can be used directly in the `format!` string --> core/src/icon.rs:325:34 | 325 | result.push_str(&format!(" - {}\n", name)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 325 - result.push_str(&format!(" - {}\n", name)); 325 + result.push_str(&format!(" - {name}\n")); | warning: variables can be used directly in the `format!` string --> core/src/icon.rs:332:34 | 332 | result.push_str(&format!("\n FOUND in pack '{}'\n", pack)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 332 - result.push_str(&format!("\n FOUND in pack '{}'\n", pack)); 332 + result.push_str(&format!("\n FOUND in pack '{pack}'\n")); | warning: variables can be used directly in the `format!` string --> core/src/icon.rs:345:38 | 345 | result.push_str(&format!(" RefAny type: UNKNOWN ('{}')\n", type_str)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 345 - result.push_str(&format!(" RefAny type: UNKNOWN ('{}')\n", type_str)); 345 + result.push_str(&format!(" RefAny type: UNKNOWN ('{type_str}')\n")); | warning: variables can be used directly in the `format!` string --> core/src/icon.rs:587:9 | 587 | / eprintln!( 588 | | "Warning: Icon replacement has {} nodes, only root node used.", 589 | | replacement_len 590 | | ); | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: struct `NodeHierarchyRef` has a public `len` method, but no `is_empty` method --> core/src/id.rs:263:5 | 263 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty = note: `#[warn(clippy::len_without_is_empty)]` implied by `#[warn(clippy::all)]` warning: struct `NodeDataContainerRef` has a public `len` method, but no `is_empty` method --> core/src/id.rs:420:5 | 420 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty warning: this public function might dereference a raw pointer but is not marked `unsafe` --> core/src/json.rs:138:58 | 138 | let slice = unsafe { core::slice::from_raw_parts(ptr, len) }; | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable --> core/src/json.rs:139:29 | 139 | Self::from_vec(slice.iter().cloned().collect()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect = note: `#[warn(clippy::iter_cloned_collect)]` implied by `#[warn(clippy::all)]` warning: comparing with null is better expressed by the `.is_null()` method --> core/src/json.rs:148:1 | 148 | impl_vec_mut!(Json, JsonVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: this public function might dereference a raw pointer but is not marked `unsafe` --> core/src/json.rs:157:58 | 157 | let slice = unsafe { core::slice::from_raw_parts(ptr, len) }; | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable --> core/src/json.rs:158:29 | 158 | Self::from_vec(slice.iter().cloned().collect()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect warning: variables can be used directly in the `format!` string --> core/src/json.rs:349:21 | 349 | write!(f, "{}", i) | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 349 - write!(f, "{}", i) 349 + write!(f, "{i}") | warning: variables can be used directly in the `format!` string --> core/src/json.rs:351:21 | 351 | write!(f, "{}", num) | ^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 351 - write!(f, "{}", num) 351 + write!(f, "{num}") | warning: large size difference between variants --> core/src/menu.rs:144:1 | 144 | / pub enum MenuItem { 145 | | /// A regular menu item with a label, optional icon, callback, and sub-items 146 | | String(StringMenuItem), | | ---------------------- the largest variant contains at least 248 bytes 147 | | /// A visual separator line (only rendered in vertical layouts) 148 | | Separator, | | --------- the second-largest variant carries no data at all 149 | | /// Forces a line break when the menu is laid out horizontally 150 | | BreakLine, 151 | | } | |_^ the entire enum is at least 256 bytes | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant = note: `#[warn(clippy::large_enum_variant)]` implied by `#[warn(clippy::all)]` help: consider boxing the large fields to reduce the total size of the enum | 146 - String(StringMenuItem), 146 + String(Box), | warning: float has excessive precision --> core/src/path_parser.rs:13:20 | 13 | const KAPPA: f32 = 0.5522847498; | ^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision = note: `#[warn(clippy::excessive_precision)]` implied by `#[warn(clippy::all)]` help: consider changing the type or truncating it to | 13 - const KAPPA: f32 = 0.5522847498; 13 + const KAPPA: f32 = 0.552_284_8; | warning: variables can be used directly in the `format!` string --> core/src/path_parser.rs:46:17 | 46 | write!(f, "unexpected char '{}' at byte {}", ch, pos) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 46 - write!(f, "unexpected char '{}' at byte {}", ch, pos) 46 + write!(f, "unexpected char '{ch}' at byte {pos}") | warning: variables can be used directly in the `format!` string --> core/src/path_parser.rs:48:45 | 48 | Self::ExpectedNumber { pos } => write!(f, "expected number at byte {}", pos), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 48 - Self::ExpectedNumber { pos } => write!(f, "expected number at byte {}", pos), 48 + Self::ExpectedNumber { pos } => write!(f, "expected number at byte {pos}"), | warning: variables can be used directly in the `format!` string --> core/src/path_parser.rs:49:45 | 49 | Self::InvalidArcFlag { pos } => write!(f, "invalid arc flag at byte {}", pos), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 49 - Self::InvalidArcFlag { pos } => write!(f, "invalid arc flag at byte {}", pos), 49 + Self::InvalidArcFlag { pos } => write!(f, "invalid arc flag at byte {pos}"), | warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` --> core/src/path_parser.rs:329:1 | 329 | pub fn parse_svg_path_d(d: &str) -> Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: either add some descriptive message or remove the attribute = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use = note: `#[warn(clippy::double_must_use)]` implied by `#[warn(clippy::all)]` warning: calls to `push` immediately after creation --> core/src/path_parser.rs:756:5 | 756 | / let mut elements = Vec::with_capacity(8); 757 | | 758 | | // Top edge (left to right) 759 | | elements.push(SvgPathElement::Line(SvgLine { ... | 846 | | end: SvgPoint { x: x + rx, y }, 847 | | })); | |________^ help: consider using the `vec![]` macro: `let elements = vec![..];` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push = note: `#[warn(clippy::vec_init_then_push)]` implied by `#[warn(clippy::all)]` warning: float has excessive precision --> core/src/prop_cache.rs:157:23 | 157 | const CM_TO_PX: f32 = 37.7952755906; | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision help: consider changing the type or truncating it to | 157 - const CM_TO_PX: f32 = 37.7952755906; 157 + const CM_TO_PX: f32 = 37.795_277; | warning: float has excessive precision --> core/src/prop_cache.rs:158:23 | 158 | const MM_TO_PX: f32 = 3.7795275591; | ^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision help: consider changing the type or truncating it to | 158 - const MM_TO_PX: f32 = 3.7795275591; 158 + const MM_TO_PX: f32 = 3.779_527_7; | warning: struct `FlatVecVec` has a public `len` method, but no `is_empty` method --> core/src/prop_cache.rs:453:5 | 453 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty warning: consider using `sort_by_key` --> core/src/prop_cache.rs:499:13 | 499 | inner.sort_by(|a, b| key_fn(a).cmp(&key_fn(b))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `inner.sort_by_key(|a| key_fn(a))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by = note: `#[warn(clippy::unnecessary_sort_by)]` implied by `#[warn(clippy::all)]` warning: use of `extend` instead of `append` for adding the full range of a second vector --> core/src/prop_cache.rs:619:13 | 619 | self.data.extend(other.data.drain(..)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.data.append(&mut other.data)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain warning: use of `extend` instead of `append` for adding the full range of a second vector --> core/src/prop_cache.rs:623:13 | 623 | self.build.extend(other.build.drain(..)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.build.append(&mut other.build)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain warning: variables can be used directly in the `format!` string --> core/src/prop_cache.rs:857:13 | 857 | / eprintln!("[PRUNE] css_props: norm+compact={} norm+other={} nonnorm={} SSP={}B | cascaded: total={} norm+compact={}", 858 | | normal_compact, normal_noncompact, nonnormal, ssp_sz, casc_total, casc_normal_compact); | |______________________________________________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: this loop never actually loops --> core/src/prop_cache.rs:1297:17 | 1297 | / loop { 1298 | | // display:none check — read directly from compact tier1 (fast u64 read) 1299 | | if let Some(cc) = compact_cache.as_ref() { 1300 | | let t1 = cc.tier1_enums[node_idx]; ... | 1374 | | break; 1375 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#never_loop = note: `#[warn(clippy::never_loop)]` implied by `#[warn(clippy::all)]` warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1399:54 | 1399 | if let Some(p) = self.get_background_content(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1402:55 | 1402 | if let Some(p) = self.get_background_position(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1405:51 | 1405 | if let Some(p) = self.get_background_size(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1408:53 | 1408 | if let Some(p) = self.get_background_repeat(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1411:45 | 1411 | if let Some(p) = self.get_font_size(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1414:47 | 1414 | if let Some(p) = self.get_font_family(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1417:46 | 1417 | if let Some(p) = self.get_text_color(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1420:46 | 1420 | if let Some(p) = self.get_text_align(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1423:47 | 1423 | if let Some(p) = self.get_line_height(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1426:50 | 1426 | if let Some(p) = self.get_letter_spacing(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1429:48 | 1429 | if let Some(p) = self.get_word_spacing(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1432:44 | 1432 | if let Some(p) = self.get_tab_size(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1435:42 | 1435 | if let Some(p) = self.get_cursor(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1438:51 | 1438 | if let Some(p) = self.get_box_shadow_left(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1444:52 | 1444 | if let Some(p) = self.get_box_shadow_right(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1450:50 | 1450 | if let Some(p) = self.get_box_shadow_top(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1453:53 | 1453 | if let Some(p) = self.get_box_shadow_bottom(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1459:52 | 1459 | if let Some(p) = self.get_border_top_color(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1462:53 | 1462 | if let Some(p) = self.get_border_left_color(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1465:54 | 1465 | if let Some(p) = self.get_border_right_color(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1468:55 | 1468 | if let Some(p) = self.get_border_bottom_color(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1471:52 | 1471 | if let Some(p) = self.get_border_top_style(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1474:53 | 1474 | if let Some(p) = self.get_border_left_style(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1477:54 | 1477 | if let Some(p) = self.get_border_right_style(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1480:55 | 1480 | if let Some(p) = self.get_border_bottom_style(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1483:58 | 1483 | if let Some(p) = self.get_border_top_left_radius(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1489:59 | 1489 | if let Some(p) = self.get_border_top_right_radius(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1495:61 | 1495 | if let Some(p) = self.get_border_bottom_left_radius(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1501:62 | 1501 | if let Some(p) = self.get_border_bottom_right_radius(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1507:43 | 1507 | if let Some(p) = self.get_opacity(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1510:45 | 1510 | if let Some(p) = self.get_transform(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1513:52 | 1513 | if let Some(p) = self.get_transform_origin(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1516:54 | 1516 | if let Some(p) = self.get_perspective_origin(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1519:55 | 1519 | if let Some(p) = self.get_backface_visibility(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1522:43 | 1522 | if let Some(p) = self.get_hyphens(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1525:45 | 1525 | if let Some(p) = self.get_direction(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1528:48 | 1528 | if let Some(p) = self.get_unicode_bidi(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1531:49 | 1531 | if let Some(p) = self.get_text_box_trim(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1534:49 | 1534 | if let Some(p) = self.get_text_box_edge(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1537:53 | 1537 | if let Some(p) = self.get_dominant_baseline(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1540:54 | 1540 | if let Some(p) = self.get_alignment_baseline(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1543:56 | 1543 | if let Some(p) = self.get_initial_letter_align(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1546:55 | 1546 | if let Some(p) = self.get_initial_letter_wrap(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1549:52 | 1549 | if let Some(p) = self.get_scrollbar_gutter(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1552:56 | 1552 | if let Some(p) = self.get_overflow_clip_margin(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1555:40 | 1555 | if let Some(p) = self.get_clip(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1558:47 | 1558 | if let Some(p) = self.get_white_space(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1561:43 | 1561 | if let Some(p) = self.get_display(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1564:41 | 1564 | if let Some(p) = self.get_float(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1567:46 | 1567 | if let Some(p) = self.get_box_sizing(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1570:41 | 1570 | if let Some(p) = self.get_width(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1573:42 | 1573 | if let Some(p) = self.get_height(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1576:45 | 1576 | if let Some(p) = self.get_min_width(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1579:46 | 1579 | if let Some(p) = self.get_min_height(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1582:45 | 1582 | if let Some(p) = self.get_max_width(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1585:46 | 1585 | if let Some(p) = self.get_max_height(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1588:44 | 1588 | if let Some(p) = self.get_position(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1591:39 | 1591 | if let Some(p) = self.get_top(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1594:42 | 1594 | if let Some(p) = self.get_bottom(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1597:41 | 1597 | if let Some(p) = self.get_right(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1600:40 | 1600 | if let Some(p) = self.get_left(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1603:47 | 1603 | if let Some(p) = self.get_padding_top(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1606:50 | 1606 | if let Some(p) = self.get_padding_bottom(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1609:48 | 1609 | if let Some(p) = self.get_padding_left(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1612:49 | 1612 | if let Some(p) = self.get_padding_right(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1615:46 | 1615 | if let Some(p) = self.get_margin_top(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1618:49 | 1618 | if let Some(p) = self.get_margin_bottom(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1621:47 | 1621 | if let Some(p) = self.get_margin_left(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1624:48 | 1624 | if let Some(p) = self.get_margin_right(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1627:52 | 1627 | if let Some(p) = self.get_border_top_width(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1630:53 | 1630 | if let Some(p) = self.get_border_left_width(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1633:54 | 1633 | if let Some(p) = self.get_border_right_width(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1636:55 | 1636 | if let Some(p) = self.get_border_bottom_width(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1639:46 | 1639 | if let Some(p) = self.get_overflow_x(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1642:46 | 1642 | if let Some(p) = self.get_overflow_y(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1645:50 | 1645 | if let Some(p) = self.get_flex_direction(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1648:45 | 1648 | if let Some(p) = self.get_flex_wrap(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1651:45 | 1651 | if let Some(p) = self.get_flex_grow(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1654:47 | 1654 | if let Some(p) = self.get_flex_shrink(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1657:51 | 1657 | if let Some(p) = self.get_justify_content(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1660:47 | 1660 | if let Some(p) = self.get_align_items(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:1663:49 | 1663 | if let Some(p) = self.get_align_content(&node_data, node_id, node_state) { | ^^^^^^^^^^ help: change this to: `node_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: the following explicit lifetimes could be elided: 'a --> core/src/prop_cache.rs:1684:25 | 1684 | pub fn downcast_mut<'a>(&'a mut self) -> &'a mut CssPropertyCache { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 1684 - pub fn downcast_mut<'a>(&'a mut self) -> &'a mut CssPropertyCache { 1684 + pub fn downcast_mut(&mut self) -> &mut CssPropertyCache { | warning: deref which would be done by auto-deref --> core/src/prop_cache.rs:1685:9 | 1685 | &mut *self.ptr | ^^^^^^^^^^^^^^ help: try: `&mut self.ptr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref = note: `#[warn(clippy::explicit_auto_deref)]` implied by `#[warn(clippy::all)]` warning: use of `extend` instead of `append` for adding the full range of a second vector --> core/src/prop_cache.rs:1721:9 | 1721 | self.user_overridden_properties.extend(other.user_overridden_properties.drain(..)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.user_overridden_properties.append(&mut other.user_overridden_properties)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain warning: use of `extend` instead of `append` for adding the full range of a second vector --> core/src/prop_cache.rs:1724:9 | 1724 | self.computed_values.extend(other.computed_values.drain(..)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.computed_values.append(&mut other.computed_values)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extend_with_drain warning: deref which would be done by auto-deref --> core/src/prop_cache.rs:1924:20 | 1924 | return *s; | ^^ help: try: `s` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref warning: variables can be used directly in the `format!` string --> core/src/prop_cache.rs:1926:25 | 1926 | let s: String = std::format!("{:?}", t); | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1926 - let s: String = std::format!("{:?}", t); 1926 + let s: String = std::format!("{t:?}"); | warning: this `if` statement can be collapsed --> core/src/prop_cache.rs:5207:17 | 5207 | / if p.state == azul_css::dynamic_selector::PseudoStateType::Normal { 5208 | | if self.should_apply_cascaded(&ctx.computed_values, p.prop_type, &p.property) { 5209 | | self.process_property(ctx, &p.property, parent_computed); 5210 | | } 5211 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` implied by `#[warn(clippy::all)]` help: collapse nested if block | 5207 ~ if p.state == azul_css::dynamic_selector::PseudoStateType::Normal 5208 ~ && self.should_apply_cascaded(&ctx.computed_values, p.prop_type, &p.property) { 5209 | self.process_property(ctx, &p.property, parent_computed); 5210 ~ } | warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/prop_cache.rs:5236:44 | 5236 | self.process_property(ctx, &prop, parent_computed); | ^^^^^ help: change this to: `prop` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` --> core/src/refany.rs:969:14 | 969 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref = note: `#[warn(clippy::into_iter_on_ref)]` implied by `#[warn(clippy::all)]` warning: this `impl` can be derived --> core/src/resources.rs:87:1 | 87 | / impl Default for AppTerminationBehavior { 88 | | fn default() -> Self { 89 | | // Default: End the process when all windows close (cross-platform behavior) 90 | | AppTerminationBehavior::EndProcess 91 | | } 92 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 74 + #[derive(Default)] 75 ~ pub enum AppTerminationBehavior { 76 | /// Return control to main() when all windows are closed (if platform supports it). ... 84 | /// Calls std::process::exit(0). 85 ~ #[default] 86 ~ EndProcess, | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/resources.rs:119:1 | 119 | impl_vec_mut!(NamedFont, NamedFontVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: comparing with null is better expressed by the `.is_null()` method --> core/src/resources.rs:174:1 | 174 | impl_vec_mut!(LoadedFont, LoadedFontVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: this `impl` can be derived --> core/src/resources.rs:196:1 | 196 | / impl Default for FontLoadingConfig { 197 | | fn default() -> Self { 198 | | FontLoadingConfig::LoadAllSystemFonts 199 | | } 200 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 186 + #[derive(Default)] 187 ~ pub enum FontLoadingConfig { 188 | /// Load all system fonts (default behavior, can be slow on systems with many fonts) 189 ~ #[default] 190 ~ LoadAllSystemFonts, | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/resources.rs:386:1 | 386 | impl_vec_mut!(Route, RouteVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: variables can be used directly in the `format!` string --> core/src/resources.rs:742:9 | 742 | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 742 - write!(f, "{}", self) 742 + write!(f, "{self}") | warning: the following explicit lifetimes could be elided: 'a --> core/src/resources.rs:887:21 | 887 | pub fn get_data<'a>(&'a self) -> &'a DecodedImage { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 887 - pub fn get_data<'a>(&'a self) -> &'a DecodedImage { 887 + pub fn get_data(&self) -> &DecodedImage { | warning: the following explicit lifetimes could be elided: 'a --> core/src/resources.rs:891:31 | 891 | pub fn get_image_callback<'a>(&'a self) -> Option<&'a CoreImageCallback> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 891 - pub fn get_image_callback<'a>(&'a self) -> Option<&'a CoreImageCallback> { 891 + pub fn get_image_callback(&self) -> Option<&CoreImageCallback> { | warning: the following explicit lifetimes could be elided: 'a --> core/src/resources.rs:902:35 | 902 | pub fn get_image_callback_mut<'a>(&'a mut self) -> Option<&'a mut CoreImageCallback> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 902 - pub fn get_image_callback_mut<'a>(&'a mut self) -> Option<&'a mut CoreImageCallback> { 902 + pub fn get_image_callback_mut(&mut self) -> Option<&mut CoreImageCallback> { | warning: using `clone` on type `ImageDescriptor` which implements the `Copy` trait --> core/src/resources.rs:939:36 | 939 | DecodedImage::Raw((descriptor.clone(), data.clone())) | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*descriptor` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: match expression looks like `matches!` macro --> core/src/resources.rs:948:9 | 948 | / match self.get_data() { 949 | | DecodedImage::NullImage { .. } => true, 950 | | _ => false, 951 | | } | |_________^ help: try: `matches!(self.get_data(), DecodedImage::NullImage { .. })` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro warning: match expression looks like `matches!` macro --> core/src/resources.rs:955:9 | 955 | / match self.get_data() { 956 | | DecodedImage::Gl(_) => true, 957 | | _ => false, 958 | | } | |_________^ help: try: `matches!(self.get_data(), DecodedImage::Gl(_))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro warning: match expression looks like `matches!` macro --> core/src/resources.rs:962:9 | 962 | / match self.get_data() { 963 | | DecodedImage::Raw((_, _)) => true, 964 | | _ => false, 965 | | } | |_________^ help: try: `matches!(self.get_data(), DecodedImage::Raw((_, _)))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro warning: match expression looks like `matches!` macro --> core/src/resources.rs:969:9 | 969 | / match self.get_data() { 970 | | DecodedImage::Callback(_) => true, 971 | | _ => false, 972 | | } | |_________^ help: try: `matches!(self.get_data(), DecodedImage::Callback(_))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro warning: use `std::ptr::eq` when comparing raw pointers --> core/src/resources.rs:1085:9 | 1085 | self.data as usize == rhs.data as usize | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(self.data, rhs.data)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq = note: `#[warn(clippy::ptr_eq)]` implied by `#[warn(clippy::all)]` warning: this `impl` can be derived --> core/src/resources.rs:1179:1 | 1179 | / impl Default for ImageCache { 1180 | | fn default() -> Self { 1181 | | Self { 1182 | | image_id_map: OrderedMap::default(), ... | 1185 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute | 1170 + #[derive(Default)] 1171 ~ pub struct ImageCache { | warning: this `impl` can be derived --> core/src/resources.rs:1328:1 | 1328 | / impl Default for RendererResources { 1329 | | fn default() -> Self { 1330 | | Self { 1331 | | currently_registered_images: OrderedMap::default(), ... | 1340 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute | 1282 + #[derive(Default)] 1283 ~ pub struct RendererResources { | warning: using `clone` on type `StyleFontFamilyHash` which implements the `Copy` trait --> core/src/resources.rs:1411:26 | 1411 | Some(font_family.clone()) | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*font_family` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `StyleFontFamiliesHash` which implements the `Copy` trait --> core/src/resources.rs:1427:26 | 1427 | Some(font_families.clone()) | ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*font_families` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: clamp-like pattern without using clamp function --> core/src/resources.rs:1669:17 | 1669 | let edge0 = hardness.max(0.0).min(1.0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `hardness.clamp(0.0, 1.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp warning: clamp-like pattern without using clamp function --> core/src/resources.rs:1671:13 | 1671 | let x = ((t - edge0) / denom).max(0.0).min(1.0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `((t - edge0) / denom).clamp(0.0, 1.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp warning: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable --> core/src/resources.rs:1682:12 | 1682 | if !(r > 0.0) || self.width == 0 || self.height == 0 { | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_cmp_op_on_partial_ord warning: clamp-like pattern without using clamp function --> core/src/resources.rs:1695:20 | 1695 | let flow = brush.flow.max(0.0).min(1.0) * (brush.color.a as f32 / 255.0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `brush.flow.clamp(0.0, 1.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp warning: clamp-like pattern without using clamp function --> core/src/resources.rs:1724:27 | 1724 | buf[ri] = (cr * a + buf[ri] as f32 * inv).round().max(0.0).min(255.0) as u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(cr * a + buf[ri] as f32 * inv).round().clamp(0.0, 255.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp warning: clamp-like pattern without using clamp function --> core/src/resources.rs:1725:27 | 1725 | buf[gi] = (cg * a + buf[gi] as f32 * inv).round().max(0.0).min(255.0) as u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(cg * a + buf[gi] as f32 * inv).round().clamp(0.0, 255.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp warning: clamp-like pattern without using clamp function --> core/src/resources.rs:1726:27 | 1726 | buf[bi] = (cb * a + buf[bi] as f32 * inv).round().max(0.0).min(255.0) as u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(cb * a + buf[bi] as f32 * inv).round().clamp(0.0, 255.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp warning: clamp-like pattern without using clamp function --> core/src/resources.rs:1728:21 | 1728 | ((a + (buf[ai] as f32 / 255.0) * inv) * 255.0).round().max(0.0).min(255.0) as u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `((a + (buf[ai] as f32 / 255.0) * inv) * 255.0).round().clamp(0.0, 255.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp warning: this `impl` can be derived --> core/src/resources.rs:2308:1 | 2308 | / impl Default for FontLCDFilter { 2309 | | fn default() -> Self { 2310 | | FontLCDFilter::Default 2311 | | } 2312 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 2301 + #[derive(Default)] 2302 ~ pub enum FontLCDFilter { 2303 | None, 2304 ~ #[default] 2305 ~ Default, | warning: this `impl` can be derived --> core/src/resources.rs:2341:1 | 2341 | / impl Default for SyntheticItalics { 2342 | | fn default() -> Self { 2343 | | Self { angle: 0 } 2344 | | } 2345 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute | 2337 + #[derive(Default)] 2338 ~ pub struct SyntheticItalics { | warning: use `std::ptr::eq` when comparing raw pointers --> core/src/resources.rs:2447:9 | 2447 | self.data as usize == rhs.data as usize | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(self.data, rhs.data)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq warning: you should consider adding a `Default` implementation for `ExternalImageId` --> core/src/resources.rs:2510:5 | 2510 | / pub fn new() -> Self { 2511 | | Self { 2512 | | inner: LAST_EXTERNAL_IMAGE_ID.fetch_add(1, AtomicOrdering::SeqCst) as u64, 2513 | | } 2514 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 2508 + impl Default for ExternalImageId { 2509 + fn default() -> Self { 2510 + Self::new() 2511 + } 2512 + } | warning: you should consider adding a `Default` implementation for `Epoch` --> core/src/resources.rs:2716:5 | 2716 | / pub const fn new() -> Self { 2717 | | Self { inner: 0 } 2718 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 2712 + impl Default for Epoch { 2713 + fn default() -> Self { 2714 + Self::new() 2715 + } 2716 + } | warning: clamp-like pattern without using clamp function --> core/src/resources.rs:2751:12 | 2751 | Au(target_app_units.min(MAX_AU).max(MIN_AU)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `target_app_units.clamp(MIN_AU, MAX_AU)` | = note: clamp will panic if max < min = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/resources.rs:2947:72 | 2947 | let current_family_hash = StyleFontFamilyHash::new(&family); | ^^^^^^^ help: change this to: `family` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: returning the result of a `let` binding from a block --> core/src/resources.rs:2972:29 | 2967 | / ... let font_ref = match (parse_font_fn)(font_data) { 2968 | | ... Some(s) => s, 2969 | | ... None => continue 'inner, 2970 | | ... }; | |________________________- unnecessary `let` binding 2971 | ... 2972 | ... font_ref | ^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `#[warn(clippy::let_and_return)]` implied by `#[warn(clippy::all)]` help: return the expression directly | 2967 ~ 2968 | 2969 ~ match (parse_font_fn)(font_data) { 2970 + Some(s) => s, 2971 + None => continue 'inner, 2972 + } | warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/resources.rs:2962:73 | 2962 | ... let font_data = match (font_source_load_fn)(&other, fc_cache) { | ^^^^^^ help: change this to: `other` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/resources.rs:3036:53 | 3036 | let image_ref_hash = image_ref_get_hash(&image_ref); | ^^^^^^^^^^ help: change this to: `image_ref` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: using `clone` on type `ImageDescriptor` which implements the `Copy` trait --> core/src/resources.rs:3085:41 | 3085 | ... descriptor: descriptor.clone(), /* deep-copy, but struct is not very | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*descriptor` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: this `impl` can be derived --> core/src/screencap.rs:30:1 | 30 | / impl Default for ScreenCaptureSource { 31 | | fn default() -> Self { 32 | | ScreenCaptureSource::PrimaryDisplay 33 | | } 34 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 21 + #[derive(Default)] 22 ~ pub enum ScreenCaptureSource { 23 | /// The primary display (the default). 24 ~ #[default] 25 ~ PrimaryDisplay, | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/style.rs:35:1 | 35 | impl_vec_mut!(CascadeInfo, CascadeInfoVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: this `match` can be collapsed into the outer `match` --> core/src/style.rs:411:24 | 411 | Some(q) => match q { | ________________________^ 412 | | CssPathSelector::PseudoSelector(q) => *q == s, 413 | | _ => false, 414 | | }, | |_____________^ | help: the outer pattern can be modified to include the inner pattern --> core/src/style.rs:411:18 | 411 | Some(q) => match q { | ^ replace this binding 412 | CssPathSelector::PseudoSelector(q) => *q == s, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match = note: `#[warn(clippy::collapsible_match)]` implied by `#[warn(clippy::all)]` warning: variables can be used directly in the `format!` string --> core/src/style.rs:485:52 | 485 | actual == t || actual.starts_with(&alloc::format!("{}-", t)) | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 485 - actual == t || actual.starts_with(&alloc::format!("{}-", t)) 485 + actual == t || actual.starts_with(&alloc::format!("{t}-")) | warning: this `if let` can be collapsed into the outer `if let` --> core/src/style.rs:552:17 | 552 | / if let CssPathPseudoSelector::Lang(expected_lang) = expected { 553 | | return lang == expected_lang; 554 | | } | |_________________^ | help: the outer pattern can be modified to include the inner pattern --> core/src/style.rs:551:25 | 551 | if let Some(expected) = expected_path_ending { | ^^^^^^^^ replace this binding 552 | if let CssPathPseudoSelector::Lang(expected_lang) = expected { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match warning: variables can be used directly in the `format!` string --> core/src/styled_dom.rs:249:9 | 249 | write!(f, "{:?}", v) | ^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 249 - write!(f, "{:?}", v) 249 + write!(f, "{v:?}") | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/styled_dom.rs:335:1 | 335 | impl_vec_mut!(StyledNode, StyledNodeVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: variables can be used directly in the `format!` string --> core/src/styled_dom.rs:548:24 | 548 | Some(n) => write!(f, "Some(NodeId({}))", n), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 548 - Some(n) => write!(f, "Some(NodeId({}))", n), 548 + Some(n) => write!(f, "Some(NodeId({n}))"), | warning: variables can be used directly in the `format!` string --> core/src/styled_dom.rs:556:9 | 556 | write!(f, "{:?}", self) | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 556 - write!(f, "{:?}", self) 556 + write!(f, "{self:?}") | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/styled_dom.rs:593:1 | 593 | impl_vec_mut!(NodeHierarchyItemId, NodeHierarchyItemIdVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: comparing with null is better expressed by the `.is_null()` method --> core/src/styled_dom.rs:694:1 | 694 | impl_vec_mut!(NodeHierarchyItem, NodeHierarchyItemVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: comparing with null is better expressed by the `.is_null()` method --> core/src/styled_dom.rs:757:1 | 757 | impl_vec_mut!(ParentWithNodeDepth, ParentWithNodeDepthVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: comparing with null is better expressed by the `.is_null()` method --> core/src/styled_dom.rs:786:1 | 786 | impl_vec_mut!(TagIdToNodeIdMapping, TagIdToNodeIdMappingVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: comparing with null is better expressed by the `.is_null()` method --> core/src/styled_dom.rs:814:1 | 814 | impl_vec_mut!(ContentGroup, ContentGroupVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: manual slice size calculation --> core/src/styled_dom.rs:905:35 | 905 | node_hierarchy_bytes: self.node_hierarchy.as_ref().len() | ___________________________________^ 906 | | * core::mem::size_of::(), | |___________________________________________________________^ help: try: `std::mem::size_of_val(self.node_hierarchy.as_ref())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation warning: manual slice size calculation --> core/src/styled_dom.rs:922:28 | 922 | tag_ids_bytes: self.tag_ids_to_node_ids.as_ref().len() | ____________________________^ 923 | | * core::mem::size_of::(), | |______________________________________________________________^ help: try: `std::mem::size_of_val(self.tag_ids_to_node_ids.as_ref())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation warning: manual slice size calculation --> core/src/styled_dom.rs:924:35 | 924 | non_leaf_nodes_bytes: self.non_leaf_nodes.as_ref().len() | ___________________________________^ 925 | | * core::mem::size_of::(), | |_____________________________________________________________^ help: try: `std::mem::size_of_val(self.non_leaf_nodes.as_ref())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation warning: the following explicit lifetimes could be elided: 'a --> core/src/styled_dom.rs:1411:35 | 1411 | pub fn get_css_property_cache<'a>(&'a self) -> &'a CssPropertyCache { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 1411 - pub fn get_css_property_cache<'a>(&'a self) -> &'a CssPropertyCache { 1411 + pub fn get_css_property_cache(&self) -> &CssPropertyCache { | warning: deref which would be done by auto-deref --> core/src/styled_dom.rs:1412:9 | 1412 | &*self.css_property_cache.ptr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&self.css_property_cache.ptr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref warning: the following explicit lifetimes could be elided: 'a --> core/src/styled_dom.rs:1417:39 | 1417 | pub fn get_css_property_cache_mut<'a>(&'a mut self) -> &'a mut CssPropertyCache { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 1417 - pub fn get_css_property_cache_mut<'a>(&'a mut self) -> &'a mut CssPropertyCache { 1417 + pub fn get_css_property_cache_mut(&mut self) -> &mut CssPropertyCache { | warning: deref which would be done by auto-deref --> core/src/styled_dom.rs:1418:9 | 1418 | &mut *self.css_property_cache.ptr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut self.css_property_cache.ptr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref warning: using `clone` on type `StyledNodeState` which implements the `Copy` trait --> core/src/styled_dom.rs:1424:9 | 1424 | / self.styled_nodes.as_container()[*node_id] 1425 | | .styled_node_state 1426 | | .clone() | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy help: try removing the `clone` call | 1424 ~ self.styled_nodes.as_container()[*node_id] 1425 + .styled_node_state | warning: using `clone` on type `StyledNodeState` which implements the `Copy` trait --> core/src/styled_dom.rs:1486:17 | 1486 | / self.styled_nodes.as_container()[*nid] 1487 | | .styled_node_state 1488 | | .clone() | |____________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy help: try removing the `clone` call | 1486 ~ self.styled_nodes.as_container()[*nid] 1487 + .styled_node_state | warning: using `clone` on type `StyledNodeState` which implements the `Copy` trait --> core/src/styled_dom.rs:1567:49 | 1567 | ... previous_state: old_node_state.clone(), | ^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*old_node_state` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `StyledNodeState` which implements the `Copy` trait --> core/src/styled_dom.rs:1572:48 | 1572 | ... current_state: new_node_state.clone(), | ^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*new_node_state` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: field assignment outside of initializer for an instance created with Default::default() --> core/src/styled_dom.rs:1615:9 | 1615 | result.gpu_only_changes = true; // Start with GPU-only assumption | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: consider initializing the variable with `styled_dom::RestyleResult { gpu_only_changes: true, ..Default::default() }` and removing relevant reassignments --> core/src/styled_dom.rs:1614:9 | 1614 | let mut result = RestyleResult::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default = note: `#[warn(clippy::field_reassign_with_default)]` implied by `#[warn(clippy::all)]` warning: using `clone` on type `StyledNodeState` which implements the `Copy` trait --> core/src/styled_dom.rs:1761:45 | 1761 | ... previous_state: old_node_state.clone(), | ^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*old_node_state` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `StyledNodeState` which implements the `Copy` trait --> core/src/styled_dom.rs:1764:44 | 1764 | ... current_state: old_node_state.clone(), | ^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*old_node_state` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/styled_dom.rs:1833:21 | 1833 | &self.node_hierarchy.as_ref(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.node_hierarchy.as_ref()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/styled_dom.rs:1924:13 | 1924 | &self.non_leaf_nodes.as_ref(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.non_leaf_nodes.as_ref()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/styled_dom.rs:1928:13 | 1928 | &self.get_css_property_cache(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.get_css_property_cache()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: struct `CompactDom` has a public `len` method, but no `is_empty` method --> core/src/styled_dom.rs:1993:5 | 1993 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty warning: using `clone` on type `Node` which implements the `Copy` trait --> core/src/styled_dom.rs:2025:50 | 2025 | node_hierarchy[parent_node_id.index()] = node.clone(); | ^^^^^^^^^^^^ help: try removing the `clone` call: `node` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `CssPropertyValue` which implements the `Copy` trait --> core/src/styled_dom.rs:2167:31 | 2167 | .and_then(|p| p.clone().get_property_or_default()) | ^^^^^^^^^ help: try dereferencing it: `(*p)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: unneeded `return` statement --> core/src/styled_dom.rs:2209:17 | 2209 | None => return, | ^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: replace `return` with a unit value | 2209 - None => return, 2209 + None => (), | warning: this looks like you are swapping `self.start` and `self.end` manually --> core/src/svg.rs:104:9 | 104 | / let temp = self.start; 105 | | self.start = self.end; 106 | | self.end = temp; | |________________________^ help: try: `std::mem::swap(&mut self.start, &mut self.end);` | = note: or maybe you should use `std::mem::replace`? = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap = note: `#[warn(clippy::manual_swap)]` implied by `#[warn(clippy::all)]` warning: accessing first element with `self.items.as_ref().get(0)` --> core/src/svg.rs:423:38 | 423 | let mut first_bounds = match self.items.as_ref().get(0) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.items.as_ref().first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `#[warn(clippy::get_first)]` implied by `#[warn(clippy::all)]` warning: using `clone` on type `SvgRect` which implements the `Copy` trait --> core/src/svg.rs:540:39 | 540 | SvgSimpleNode::Rect(a) => a.clone(), | ^^^^^^^^^ help: try dereferencing it: `*a` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `SvgRect` which implements the `Copy` trait --> core/src/svg.rs:542:43 | 542 | SvgSimpleNode::RectHole(a) => a.clone(), | ^^^^^^^^^ help: try dereferencing it: `*a` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `SvgRect` which implements the `Copy` trait --> core/src/svg.rs:588:33 | 588 | SvgNode::Rect(a) => a.clone(), | ^^^^^^^^^ help: try dereferencing it: `*a` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: the following explicit lifetimes could be elided: 'a --> core/src/svg.rs:810:21 | 810 | pub fn as_slice<'a>(&'a self) -> &'a [TessellatedSvgNode] { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 810 - pub fn as_slice<'a>(&'a self) -> &'a [TessellatedSvgNode] { 810 + pub fn as_slice(&self) -> &[TessellatedSvgNode] { | warning: the following explicit lifetimes could be elided: 'a --> core/src/svg.rs:887:21 | 887 | pub fn as_slice<'a>(&'a self) -> &'a [TessellatedColoredSvgNode] { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 887 - pub fn as_slice<'a>(&'a self) -> &'a [TessellatedColoredSvgNode] { 887 + pub fn as_slice(&self) -> &[TessellatedColoredSvgNode] { | warning: this `impl` can be derived --> core/src/svg.rs:1084:1 | 1084 | / impl Default for SvgFillRule { 1085 | | fn default() -> Self { 1086 | | SvgFillRule::Winding 1087 | | } 1088 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 1079 + #[derive(Default)] 1080 ~ pub enum SvgFillRule { 1081 ~ #[default] 1082 ~ Winding, | warning: this `impl` can be derived --> core/src/svg.rs:1236:1 | 1236 | / impl Default for SvgLineCap { 1237 | | fn default() -> Self { 1238 | | SvgLineCap::Butt 1239 | | } 1240 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 1230 + #[derive(Default)] 1231 ~ pub enum SvgLineCap { 1232 ~ #[default] 1233 ~ Butt, | warning: this `impl` can be derived --> core/src/svg.rs:1252:1 | 1252 | / impl Default for SvgLineJoin { 1253 | | fn default() -> Self { 1254 | | SvgLineJoin::Miter 1255 | | } 1256 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 1245 + #[derive(Default)] 1246 ~ pub enum SvgLineJoin { 1247 ~ #[default] 1248 ~ Miter, | warning: this `impl` can be derived --> core/src/svg.rs:1337:1 | 1337 | / impl Default for SvgFitTo { 1338 | | fn default() -> Self { 1339 | | SvgFitTo::Original 1340 | | } 1341 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 1330 + #[derive(Default)] 1331 ~ pub enum SvgFitTo { 1332 ~ #[default] 1333 ~ Original, | warning: variables can be used directly in the `format!` string --> core/src/svg.rs:1437:33 | 1437 | ParsingFailed(e) => write!(f, "Error parsing SVG: Parsing SVG as XML failed: {}", e), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1437 - ParsingFailed(e) => write!(f, "Error parsing SVG: Parsing SVG as XML failed: {}", e), 1437 + ParsingFailed(e) => write!(f, "Error parsing SVG: Parsing SVG as XML failed: {e}"), | warning: clamp-like pattern without using clamp function --> core/src/task.rs:208:9 | 208 | duration_current.div(&duration_total).max(0.0).min(1.0) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `duration_current.div(&duration_total).clamp(0.0, 1.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp warning: using `clone` on type `SystemTimeDiff` which implements the `Copy` trait --> core/src/task.rs:220:46 | 220 | let d: StdDuration = d.clone().into(); | ^^^^^^^^^ help: try dereferencing it: `(*d)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: non-canonical implementation of `clone` on a `Copy` type --> core/src/macros.rs:158:37 | 158 | fn clone(&self) -> Self { | _____________________________________^ 159 | | $callback_value { 160 | | cb: self.cb.clone(), 161 | | } 162 | | } | |_____________^ help: change this to: `{ *self }` | ::: core/src/task.rs:327:1 | 327 | impl_callback_simple!(InstantPtrCloneCallback); | ---------------------------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl = note: `#[warn(clippy::non_canonical_clone_impl)]` implied by `#[warn(clippy::all)]` = note: this warning originates in the macro `impl_callback_simple` (in Nightly builds, run with -Z macro-backtrace for more info) warning: non-canonical implementation of `clone` on a `Copy` type --> core/src/macros.rs:158:37 | 158 | fn clone(&self) -> Self { | _____________________________________^ 159 | | $callback_value { 160 | | cb: self.cb.clone(), 161 | | } 162 | | } | |_____________^ help: change this to: `{ *self }` | ::: core/src/task.rs:334:1 | 334 | impl_callback_simple!(InstantPtrDestructorCallback); | --------------------------------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl = note: this warning originates in the macro `impl_callback_simple` (in Nightly builds, run with -Z macro-backtrace for more info) warning: using `clone` on type `InstantPtrCloneCallback` which implements the `Copy` trait --> core/src/task.rs:427:19 | 427 | clone_fn: az_instant_ptr.clone_fn.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `az_instant_ptr.clone_fn` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `InstantPtrDestructorCallback` which implements the `Copy` trait --> core/src/task.rs:428:21 | 428 | destructor: az_instant_ptr.destructor.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `az_instant_ptr.destructor` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `SystemTimeDiff` which implements the `Copy` trait --> core/src/task.rs:488:38 | 488 | let s: StdDuration = s.clone().into(); | ^^^^^^^^^ help: try dereferencing it: `(*s)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: variables can be used directly in the `format!` string --> core/src/task.rs:489:17 | 489 | write!(f, "{:?}", s) | ^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 489 - write!(f, "{:?}", s) 489 + write!(f, "{s:?}") | warning: using `clone` on type `SystemTimeDiff` which implements the `Copy` trait --> core/src/task.rs:547:42 | 547 | let s: StdDuration = s.clone().into(); | ^^^^^^^^^ help: try dereferencing it: `(*s)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `SystemTimeDiff` which implements the `Copy` trait --> core/src/task.rs:548:42 | 548 | let o: StdDuration = o.clone().into(); | ^^^^^^^^^ help: try dereferencing it: `(*o)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `SystemTimeDiff` which implements the `Copy` trait --> core/src/task.rs:572:42 | 572 | let s: StdDuration = s.clone().into(); | ^^^^^^^^^ help: try dereferencing it: `(*s)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `SystemTimeDiff` which implements the `Copy` trait --> core/src/task.rs:573:42 | 573 | let o: StdDuration = o.clone().into(); | ^^^^^^^^^ help: try dereferencing it: `(*o)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: use `std::ptr::eq` when comparing raw pointers --> core/src/task.rs:827:9 | 827 | (self.ptr.as_ref() as *const _ as usize) == (other.ptr.as_ref() as *const _ as usize) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(self.ptr.as_ref(), other.ptr.as_ref())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq warning: non-canonical implementation of `clone` on a `Copy` type --> core/src/macros.rs:158:37 | 158 | fn clone(&self) -> Self { | _____________________________________^ 159 | | $callback_value { 160 | | cb: self.cb.clone(), 161 | | } 162 | | } | |_____________^ help: change this to: `{ *self }` | ::: core/src/task.rs:864:1 | 864 | impl_callback_simple!(GetSystemTimeCallback); | -------------------------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl = note: this warning originates in the macro `impl_callback_simple` (in Nightly builds, run with -Z macro-backtrace for more info) warning: non-canonical implementation of `clone` on a `Copy` type --> core/src/macros.rs:158:37 | 158 | fn clone(&self) -> Self { | _____________________________________^ 159 | | $callback_value { 160 | | cb: self.cb.clone(), 161 | | } 162 | | } | |_____________^ help: change this to: `{ *self }` | ::: core/src/task.rs:889:1 | 889 | impl_callback_simple!(CheckThreadFinishedCallback); | -------------------------------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl = note: this warning originates in the macro `impl_callback_simple` (in Nightly builds, run with -Z macro-backtrace for more info) warning: non-canonical implementation of `clone` on a `Copy` type --> core/src/macros.rs:158:37 | 158 | fn clone(&self) -> Self { | _____________________________________^ 159 | | $callback_value { 160 | | cb: self.cb.clone(), 161 | | } 162 | | } | |_____________^ help: change this to: `{ *self }` | ::: core/src/task.rs:899:1 | 899 | impl_callback_simple!(LibrarySendThreadMsgCallback); | --------------------------------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl = note: this warning originates in the macro `impl_callback_simple` (in Nightly builds, run with -Z macro-backtrace for more info) warning: non-canonical implementation of `clone` on a `Copy` type --> core/src/macros.rs:158:37 | 158 | fn clone(&self) -> Self { | _____________________________________^ 159 | | $callback_value { 160 | | cb: self.cb.clone(), 161 | | } 162 | | } | |_____________^ help: change this to: `{ *self }` | ::: core/src/task.rs:909:1 | 909 | impl_callback_simple!(ThreadRecvCallback); | ----------------------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl = note: this warning originates in the macro `impl_callback_simple` (in Nightly builds, run with -Z macro-backtrace for more info) warning: non-canonical implementation of `clone` on a `Copy` type --> core/src/macros.rs:158:37 | 158 | fn clone(&self) -> Self { | _____________________________________^ 159 | | $callback_value { 160 | | cb: self.cb.clone(), 161 | | } 162 | | } | |_____________^ help: change this to: `{ *self }` | ::: core/src/task.rs:918:1 | 918 | impl_callback_simple!(ThreadReceiverDestructorCallback); | ------------------------------------------------------- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl = note: this warning originates in the macro `impl_callback_simple` (in Nightly builds, run with -Z macro-backtrace for more info) warning: transmute used without annotations --> core/src/transform.rs:783:70 | 783 | let mut result = _mm_mul_ps(_mm_shuffle_ps(a, a, 0x00), mem::transmute(b.m[0])); | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<[f32; 4], std::arch::x86_64::__m128>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations = note: `#[warn(clippy::missing_transmute_annotations)]` implied by `#[warn(clippy::all)]` warning: transmute used without annotations --> core/src/transform.rs:786:57 | 786 | _mm_mul_ps(_mm_shuffle_ps(a, a, 0x55), mem::transmute(b.m[1])), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<[f32; 4], std::arch::x86_64::__m128>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations warning: transmute used without annotations --> core/src/transform.rs:790:57 | 790 | _mm_mul_ps(_mm_shuffle_ps(a, a, 0xaa), mem::transmute(b.m[2])), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<[f32; 4], std::arch::x86_64::__m128>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations warning: transmute used without annotations --> core/src/transform.rs:794:57 | 794 | _mm_mul_ps(_mm_shuffle_ps(a, a, 0xff), mem::transmute(b.m[3])), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<[f32; 4], std::arch::x86_64::__m128>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations warning: transmute used without annotations --> core/src/transform.rs:827:38 | 827 | _mm256_broadcast_ps(mem::transmute(&b.m[0])), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<&[f32; 4], &std::arch::x86_64::__m128>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations warning: transmute used without annotations --> core/src/transform.rs:833:42 | 833 | _mm256_broadcast_ps(mem::transmute(&b.m[1])), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<&[f32; 4], &std::arch::x86_64::__m128>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations warning: transmute used without annotations --> core/src/transform.rs:840:42 | 840 | _mm256_broadcast_ps(mem::transmute(&b.m[2])), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<&[f32; 4], &std::arch::x86_64::__m128>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations warning: transmute used without annotations --> core/src/transform.rs:847:42 | 847 | _mm256_broadcast_ps(mem::transmute(&b.m[3])), | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<&[f32; 4], &std::arch::x86_64::__m128>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations warning: transmute from a reference to a pointer --> core/src/transform.rs:864:43 | 864 | let a01: __m256 = _mm256_loadu_ps(mem::transmute(&self.m[0][0])); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&self.m[0][0] as *const f32` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute = note: `#[warn(clippy::useless_transmute)]` implied by `#[warn(clippy::all)]` warning: transmute from a reference to a pointer --> core/src/transform.rs:865:43 | 865 | let a23: __m256 = _mm256_loadu_ps(mem::transmute(&self.m[2][0])); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&self.m[2][0] as *const f32` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute warning: transmute from a reference to a pointer --> core/src/transform.rs:874:26 | 874 | _mm256_storeu_ps(mem::transmute(&mut out.m[0][0]), out01x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut out.m[0][0] as *mut f32` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute warning: transmute from a reference to a pointer --> core/src/transform.rs:875:26 | 875 | _mm256_storeu_ps(mem::transmute(&mut out.m[2][0]), out23x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut out.m[2][0] as *mut f32` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute warning: doc list item without indentation --> core/src/ua_css.rs:426:5 | 426 | /// TODO: Change to PaddingInlineStart once logical property resolution is implemented | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation = note: `#[warn(clippy::doc_lazy_continuation)]` implied by `#[warn(clippy::all)]` help: indent this line | 426 | /// TODO: Change to PaddingInlineStart once logical property resolution is implemented | +++ warning: returning the result of a `let` binding from a block --> core/src/ua_css.rs:822:5 | 544 | / let result = match (node_type, property_type) { 545 | | // Body Element - CRITICAL for preventing layout collapse 546 | | (NT::Body, PT::Display) => Some(&DISPLAY_BLOCK), ... | 819 | | _ => None, 820 | | }; | |______- unnecessary `let` binding 821 | 822 | result | ^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 544 ~ 545 | 546 ~ match (node_type, property_type) { 547 + // Body Element - CRITICAL for preventing layout collapse 548 + (NT::Body, PT::Display) => Some(&DISPLAY_BLOCK), 549 + // NOTE: Body does NOT have width: 100% in standard UA CSS - it inherits from ICB 550 + // (NT::Body, PT::Height) => Some(&HEIGHT_100_PERCENT), 551 + (NT::Body, PT::MarginTop) => Some(&MARGIN_TOP_8PX), 552 + (NT::Body, PT::MarginBottom) => Some(&MARGIN_BOTTOM_8PX), 553 + (NT::Body, PT::MarginLeft) => Some(&MARGIN_LEFT_8PX), 554 + (NT::Body, PT::MarginRight) => Some(&MARGIN_RIGHT_8PX), 555 + 556 + // Block-level Elements 557 + // NOTE: Do NOT set width: 100% here! Block elements have width: auto by default 558 + // in CSS spec. width: auto for blocks means "fill available width" but it's NOT 559 + // the same as width: 100%. The difference is critical for flexbox: width: auto 560 + // allows flex-grow/flex-shrink to control sizing, while width: 100% prevents it. 561 + (NT::Div, PT::Display) => Some(&DISPLAY_BLOCK), 562 + (NT::P, PT::Display) => Some(&DISPLAY_BLOCK), 563 + // REMOVED - blocks have width: auto by default 564 + // (NT::Div, PT::Width) => Some(&WIDTH_100_PERCENT), 565 + // REMOVED - blocks have width: auto by default 566 + // (NT::P, PT::Width) => Some(&WIDTH_100_PERCENT), 567 + (NT::P, PT::MarginTop) => Some(&MARGIN_TOP_1EM), 568 + (NT::P, PT::MarginBottom) => Some(&MARGIN_BOTTOM_1EM), 569 + (NT::Main, PT::Display) => Some(&DISPLAY_BLOCK), 570 + (NT::Header, PT::Display) => Some(&DISPLAY_BLOCK), 571 + (NT::Footer, PT::Display) => Some(&DISPLAY_BLOCK), 572 + (NT::Section, PT::Display) => Some(&DISPLAY_BLOCK), 573 + (NT::Article, PT::Display) => Some(&DISPLAY_BLOCK), 574 + (NT::Aside, PT::Display) => Some(&DISPLAY_BLOCK), 575 + (NT::Nav, PT::Display) => Some(&DISPLAY_BLOCK), 576 + 577 + // Headings - Chrome UA CSS values 578 + // Per CSS Fragmentation Level 3: headings should avoid page breaks inside 579 + // and after them (to keep heading with following content) 580 + (NT::H1, PT::Display) => Some(&DISPLAY_BLOCK), 581 + (NT::H1, PT::FontSize) => Some(&FONT_SIZE_2EM), 582 + (NT::H1, PT::FontWeight) => Some(&FONT_WEIGHT_BOLD), 583 + (NT::H1, PT::MarginTop) => Some(&MARGIN_TOP_0_67EM), 584 + (NT::H1, PT::MarginBottom) => Some(&MARGIN_BOTTOM_0_67EM), 585 + (NT::H1, PT::BreakInside) => Some(&BREAK_INSIDE_AVOID), 586 + (NT::H1, PT::BreakAfter) => Some(&BREAK_AFTER_AVOID), 587 + 588 + (NT::H2, PT::Display) => Some(&DISPLAY_BLOCK), 589 + (NT::H2, PT::FontSize) => Some(&FONT_SIZE_1_5EM), 590 + (NT::H2, PT::FontWeight) => Some(&FONT_WEIGHT_BOLD), 591 + (NT::H2, PT::MarginTop) => Some(&MARGIN_TOP_0_83EM), 592 + (NT::H2, PT::MarginBottom) => Some(&MARGIN_BOTTOM_0_83EM), 593 + (NT::H2, PT::BreakInside) => Some(&BREAK_INSIDE_AVOID), 594 + (NT::H2, PT::BreakAfter) => Some(&BREAK_AFTER_AVOID), 595 + 596 + (NT::H3, PT::Display) => Some(&DISPLAY_BLOCK), 597 + (NT::H3, PT::FontSize) => Some(&FONT_SIZE_1_17EM), 598 + (NT::H3, PT::FontWeight) => Some(&FONT_WEIGHT_BOLD), 599 + (NT::H3, PT::MarginTop) => Some(&MARGIN_TOP_1EM), 600 + (NT::H3, PT::MarginBottom) => Some(&MARGIN_BOTTOM_1EM), 601 + (NT::H3, PT::BreakInside) => Some(&BREAK_INSIDE_AVOID), 602 + (NT::H3, PT::BreakAfter) => Some(&BREAK_AFTER_AVOID), 603 + 604 + (NT::H4, PT::Display) => Some(&DISPLAY_BLOCK), 605 + (NT::H4, PT::FontSize) => Some(&FONT_SIZE_1EM), 606 + (NT::H4, PT::FontWeight) => Some(&FONT_WEIGHT_BOLD), 607 + (NT::H4, PT::MarginTop) => Some(&MARGIN_TOP_1_33EM), 608 + (NT::H4, PT::MarginBottom) => Some(&MARGIN_BOTTOM_1_33EM), 609 + (NT::H4, PT::BreakInside) => Some(&BREAK_INSIDE_AVOID), 610 + (NT::H4, PT::BreakAfter) => Some(&BREAK_AFTER_AVOID), 611 + 612 + (NT::H5, PT::Display) => Some(&DISPLAY_BLOCK), 613 + (NT::H5, PT::FontSize) => Some(&FONT_SIZE_0_83EM), 614 + (NT::H5, PT::FontWeight) => Some(&FONT_WEIGHT_BOLD), 615 + (NT::H5, PT::MarginTop) => Some(&MARGIN_TOP_1_67EM), 616 + (NT::H5, PT::MarginBottom) => Some(&MARGIN_BOTTOM_1_67EM), 617 + (NT::H5, PT::BreakInside) => Some(&BREAK_INSIDE_AVOID), 618 + (NT::H5, PT::BreakAfter) => Some(&BREAK_AFTER_AVOID), 619 + 620 + (NT::H6, PT::Display) => Some(&DISPLAY_BLOCK), 621 + (NT::H6, PT::FontSize) => Some(&FONT_SIZE_0_67EM), 622 + (NT::H6, PT::FontWeight) => Some(&FONT_WEIGHT_BOLD), 623 + (NT::H6, PT::MarginTop) => Some(&MARGIN_TOP_2_33EM), 624 + (NT::H6, PT::MarginBottom) => Some(&MARGIN_BOTTOM_2_33EM), 625 + (NT::H6, PT::BreakInside) => Some(&BREAK_INSIDE_AVOID), 626 + (NT::H6, PT::BreakAfter) => Some(&BREAK_AFTER_AVOID), 627 + 628 + // Lists - padding on container creates gutter for markers 629 + (NT::Ul, PT::Display) => Some(&DISPLAY_BLOCK), 630 + (NT::Ul, PT::ListStyleType) => Some(&LIST_STYLE_TYPE_DISC), 631 + (NT::Ul, PT::CounterReset) => Some(&COUNTER_RESET_LIST_ITEM), 632 + (NT::Ul, PT::PaddingLeft) => Some(&PADDING_INLINE_START_40PX), 633 + (NT::Ol, PT::Display) => Some(&DISPLAY_BLOCK), 634 + (NT::Ol, PT::ListStyleType) => Some(&LIST_STYLE_TYPE_DECIMAL), 635 + (NT::Ol, PT::CounterReset) => Some(&COUNTER_RESET_LIST_ITEM), 636 + (NT::Ol, PT::PaddingLeft) => Some(&PADDING_INLINE_START_40PX), 637 + (NT::Li, PT::Display) => Some(&DISPLAY_LIST_ITEM), 638 + (NT::Dl, PT::Display) => Some(&DISPLAY_BLOCK), 639 + (NT::Dt, PT::Display) => Some(&DISPLAY_BLOCK), 640 + (NT::Dd, PT::Display) => Some(&DISPLAY_BLOCK), 641 + 642 + // Inline Elements 643 + (NT::Span, PT::Display) => Some(&DISPLAY_INLINE), 644 + (NT::A, PT::Display) => Some(&DISPLAY_INLINE), 645 + (NT::A, PT::TextDecoration) => Some(&TEXT_DECORATION_UNDERLINE), 646 + (NT::Strong, PT::Display) => Some(&DISPLAY_INLINE), 647 + (NT::Strong, PT::FontWeight) => Some(&FONT_WEIGHT_BOLDER), 648 + (NT::Em, PT::Display) => Some(&DISPLAY_INLINE), 649 + (NT::B, PT::Display) => Some(&DISPLAY_INLINE), 650 + (NT::B, PT::FontWeight) => Some(&FONT_WEIGHT_BOLDER), 651 + (NT::I, PT::Display) => Some(&DISPLAY_INLINE), 652 + (NT::U, PT::Display) => Some(&DISPLAY_INLINE), 653 + (NT::U, PT::TextDecoration) => Some(&TEXT_DECORATION_UNDERLINE), 654 + (NT::Small, PT::Display) => Some(&DISPLAY_INLINE), 655 + (NT::Code, PT::Display) => Some(&DISPLAY_INLINE), 656 + (NT::Kbd, PT::Display) => Some(&DISPLAY_INLINE), 657 + (NT::Samp, PT::Display) => Some(&DISPLAY_INLINE), 658 + (NT::Sub, PT::Display) => Some(&DISPLAY_INLINE), 659 + (NT::Sup, PT::Display) => Some(&DISPLAY_INLINE), 660 + 661 + // Text Content 662 + (NT::Pre, PT::Display) => Some(&DISPLAY_BLOCK), 663 + (NT::BlockQuote, PT::Display) => Some(&DISPLAY_BLOCK), 664 + (NT::Hr, PT::Display) => Some(&DISPLAY_BLOCK), 665 + (NT::Hr, PT::Width) => Some(&WIDTH_100_PERCENT), 666 + (NT::Hr, PT::Height) => Some(&HEIGHT_ZERO), 667 + (NT::Hr, PT::MarginTop) => Some(&MARGIN_TOP_0_5EM), 668 + (NT::Hr, PT::MarginBottom) => Some(&MARGIN_BOTTOM_0_5EM), 669 + (NT::Hr, PT::BorderTopStyle) => Some(&BORDER_TOP_STYLE_INSET), 670 + (NT::Hr, PT::BorderTopWidth) => Some(&BORDER_TOP_WIDTH_1PX), 671 + (NT::Hr, PT::BorderTopColor) => Some(&BORDER_TOP_COLOR_GRAY), 672 + 673 + // Table Elements 674 + // Per CSS Fragmentation Level 3: table ROWS should avoid breaks inside 675 + // Tables themselves should NOT have break-inside: avoid (they can span pages) 676 + (NT::Table, PT::Display) => Some(&DISPLAY_TABLE), 677 + // NOTE: Removed break-inside: avoid from Table - tables CAN break across pages 678 + (NT::THead, PT::Display) => Some(&DISPLAY_TABLE_HEADER_GROUP), 679 + (NT::THead, PT::VerticalAlign) => Some(&VERTICAL_ALIGN_MIDDLE), 680 + (NT::THead, PT::BreakInside) => Some(&BREAK_INSIDE_AVOID), 681 + (NT::TBody, PT::Display) => Some(&DISPLAY_TABLE_ROW_GROUP), 682 + (NT::TBody, PT::VerticalAlign) => Some(&VERTICAL_ALIGN_MIDDLE), 683 + // NOTE: Removed break-inside: avoid from TBody - tbody CAN break across pages 684 + (NT::TFoot, PT::Display) => Some(&DISPLAY_TABLE_FOOTER_GROUP), 685 + (NT::TFoot, PT::VerticalAlign) => Some(&VERTICAL_ALIGN_MIDDLE), 686 + (NT::TFoot, PT::BreakInside) => Some(&BREAK_INSIDE_AVOID), 687 + (NT::Tr, PT::Display) => Some(&DISPLAY_TABLE_ROW), 688 + (NT::Tr, PT::VerticalAlign) => Some(&VERTICAL_ALIGN_MIDDLE), 689 + (NT::Tr, PT::BreakInside) => Some(&BREAK_INSIDE_AVOID), 690 + (NT::Th, PT::Display) => Some(&DISPLAY_TABLE_CELL), 691 + (NT::Th, PT::TextAlign) => Some(&TEXT_ALIGN_CENTER), 692 + (NT::Th, PT::FontWeight) => Some(&FONT_WEIGHT_BOLD), 693 + (NT::Th, PT::VerticalAlign) => Some(&VERTICAL_ALIGN_MIDDLE), 694 + (NT::Th, PT::PaddingTop) => Some(&PADDING_TOP_1PX), 695 + (NT::Th, PT::PaddingBottom) => Some(&PADDING_BOTTOM_1PX), 696 + (NT::Th, PT::PaddingLeft) => Some(&PADDING_LEFT_1PX), 697 + (NT::Th, PT::PaddingRight) => Some(&PADDING_RIGHT_1PX), 698 + (NT::Td, PT::Display) => Some(&DISPLAY_TABLE_CELL), 699 + (NT::Td, PT::VerticalAlign) => Some(&VERTICAL_ALIGN_MIDDLE), 700 + (NT::Td, PT::PaddingTop) => Some(&PADDING_TOP_1PX), 701 + (NT::Td, PT::PaddingBottom) => Some(&PADDING_BOTTOM_1PX), 702 + (NT::Td, PT::PaddingLeft) => Some(&PADDING_LEFT_1PX), 703 + (NT::Td, PT::PaddingRight) => Some(&PADDING_RIGHT_1PX), 704 + 705 + // Form Elements 706 + (NT::Form, PT::Display) => Some(&DISPLAY_BLOCK), 707 + (NT::Input, PT::Display) => Some(&DISPLAY_INLINE_BLOCK), 708 + (NT::Button, PT::Display) => Some(&DISPLAY_INLINE_BLOCK), 709 + (NT::Button, PT::Cursor) => Some(&CURSOR_POINTER), 710 + (NT::Button, PT::FontSize) => Some(&FONT_SIZE_13PX), 711 + (NT::Button, PT::PaddingTop) => Some(&PADDING_TOP_5PX), 712 + (NT::Button, PT::PaddingBottom) => Some(&PADDING_BOTTOM_5PX), 713 + (NT::Button, PT::PaddingLeft) => Some(&PADDING_LEFT_10PX), 714 + (NT::Button, PT::PaddingRight) => Some(&PADDING_RIGHT_10PX), 715 + (NT::Button, PT::BorderTopWidth) => Some(&BUTTON_BORDER_TOP_WIDTH), 716 + (NT::Button, PT::BorderBottomWidth) => Some(&BUTTON_BORDER_BOTTOM_WIDTH), 717 + (NT::Button, PT::BorderLeftWidth) => Some(&BUTTON_BORDER_LEFT_WIDTH), 718 + (NT::Button, PT::BorderRightWidth) => Some(&BUTTON_BORDER_RIGHT_WIDTH), 719 + (NT::Button, PT::BorderTopStyle) => Some(&BUTTON_BORDER_TOP_STYLE), 720 + (NT::Button, PT::BorderBottomStyle) => Some(&BUTTON_BORDER_BOTTOM_STYLE), 721 + (NT::Button, PT::BorderLeftStyle) => Some(&BUTTON_BORDER_LEFT_STYLE), 722 + (NT::Button, PT::BorderRightStyle) => Some(&BUTTON_BORDER_RIGHT_STYLE), 723 + (NT::Button, PT::BorderTopColor) => Some(&BUTTON_BORDER_TOP_COLOR), 724 + (NT::Button, PT::BorderBottomColor) => Some(&BUTTON_BORDER_BOTTOM_COLOR), 725 + (NT::Button, PT::BorderLeftColor) => Some(&BUTTON_BORDER_LEFT_COLOR), 726 + (NT::Button, PT::BorderRightColor) => Some(&BUTTON_BORDER_RIGHT_COLOR), 727 + // Text nodes get I-beam cursor for text selection 728 + // The cursor resolution algorithm ensures that explicit cursor properties 729 + // on parent elements (e.g., cursor:pointer on button) take precedence 730 + (NT::Text(_), PT::Cursor) => Some(&CURSOR_TEXT), 731 + (NT::Select, PT::Display) => Some(&DISPLAY_INLINE_BLOCK), 732 + (NT::TextArea, PT::Display) => Some(&DISPLAY_INLINE_BLOCK), 733 + // TextArea gets I-beam cursor since it's an editable text field 734 + (NT::TextArea, PT::Cursor) => Some(&CURSOR_TEXT), 735 + (NT::Label, PT::Display) => Some(&DISPLAY_INLINE), 736 + // Hidden Elements 737 + (NT::Head, PT::Display) => Some(&DISPLAY_NONE), 738 + (NT::Title, PT::Display) => Some(&DISPLAY_NONE), 739 + (NT::Script, PT::Display) => Some(&DISPLAY_NONE), 740 + (NT::Style, PT::Display) => Some(&DISPLAY_NONE), 741 + (NT::Link, PT::Display) => Some(&DISPLAY_NONE), 742 + 743 + // Special Elements 744 + (NT::Br, PT::Display) => Some(&DISPLAY_BLOCK), 745 + // Images are replaced elements - inline-block so they respect width/height 746 + (NT::Image(_), PT::Display) => Some(&DISPLAY_INLINE_BLOCK), 747 + 748 + // Media Elements 749 + (NT::Video, PT::Display) => Some(&DISPLAY_INLINE), 750 + (NT::Audio, PT::Display) => Some(&DISPLAY_INLINE), 751 + (NT::Canvas, PT::Display) => Some(&DISPLAY_INLINE), 752 + (NT::Svg, PT::Display) => Some(&DISPLAY_INLINE), 753 ~ // VirtualView is a block-level replaced element (like div) — must be block 754 + // so it participates in flex layout (flex-grow, etc.) 755 + (NT::VirtualView, PT::Display) => Some(&DISPLAY_BLOCK), 756 + 757 + // Icon Elements - inline-block so they have width/height but flow inline 758 + (NT::Icon(_), PT::Display) => Some(&DISPLAY_INLINE_BLOCK), 759 + 760 + (NT::SelectOption, PT::Display) => Some(&DISPLAY_NONE), 761 + (NT::OptGroup, PT::Display) => Some(&DISPLAY_NONE), 762 + 763 + // Other Inline Elements 764 + (NT::Abbr, PT::Display) => Some(&DISPLAY_INLINE), 765 + (NT::Cite, PT::Display) => Some(&DISPLAY_INLINE), 766 + (NT::Del, PT::Display) => Some(&DISPLAY_INLINE), 767 + (NT::Ins, PT::Display) => Some(&DISPLAY_INLINE), 768 + (NT::Mark, PT::Display) => Some(&DISPLAY_INLINE), 769 + (NT::Q, PT::Display) => Some(&DISPLAY_INLINE), 770 + (NT::Dfn, PT::Display) => Some(&DISPLAY_INLINE), 771 + (NT::Var, PT::Display) => Some(&DISPLAY_INLINE), 772 + (NT::Time, PT::Display) => Some(&DISPLAY_INLINE), 773 + (NT::Data, PT::Display) => Some(&DISPLAY_INLINE), 774 + (NT::Wbr, PT::Display) => Some(&DISPLAY_INLINE), 775 + (NT::Bdi, PT::Display) => Some(&DISPLAY_INLINE), 776 + (NT::Bdo, PT::Display) => Some(&DISPLAY_INLINE), 777 + (NT::Rp, PT::Display) => Some(&DISPLAY_INLINE), 778 + (NT::Rt, PT::Display) => Some(&DISPLAY_INLINE), 779 + (NT::Rtc, PT::Display) => Some(&DISPLAY_INLINE), 780 + (NT::Ruby, PT::Display) => Some(&DISPLAY_INLINE), 781 + 782 + // Block Container Elements 783 + // Per CSS Fragmentation Level 3: figures should avoid page breaks inside 784 + (NT::FieldSet, PT::Display) => Some(&DISPLAY_BLOCK), 785 + (NT::Figure, PT::Display) => Some(&DISPLAY_BLOCK), 786 + (NT::Figure, PT::BreakInside) => Some(&BREAK_INSIDE_AVOID), 787 + (NT::FigCaption, PT::Display) => Some(&DISPLAY_BLOCK), 788 + (NT::FigCaption, PT::BreakInside) => Some(&BREAK_INSIDE_AVOID), 789 + (NT::Details, PT::Display) => Some(&DISPLAY_BLOCK), 790 + (NT::Summary, PT::Display) => Some(&DISPLAY_BLOCK), 791 + (NT::Dialog, PT::Display) => Some(&DISPLAY_BLOCK), 792 + 793 + // Table Caption 794 + (NT::Caption, PT::Display) => Some(&DISPLAY_TABLE_CAPTION), 795 + (NT::ColGroup, PT::Display) => Some(&DISPLAY_TABLE_COLUMN_GROUP), 796 + (NT::Col, PT::Display) => Some(&DISPLAY_TABLE_COLUMN), 797 + 798 + // Legacy/Deprecated Elements 799 + (NT::Menu, PT::Display) => Some(&DISPLAY_BLOCK), 800 + (NT::Dir, PT::Display) => Some(&DISPLAY_BLOCK), 801 + 802 + // Html (root) Element 803 + // 804 + // In browsers, the viewport itself provides scrolling when overflows. 805 + // Since Azul has no separate viewport scroll mechanism, we set `height: 100%` 806 + // on the element so it fills the Initial Containing Block (the viewport). 807 + // This constrains child elements like to the viewport height, enabling 808 + // overflow:scroll on to create scrollable content areas. 809 + // 810 + // Without this, has height:auto and grows to fit all content, 811 + // making container_size == content_size, which results in a useless 100% scrollbar. 812 + (NT::Html, PT::Display) => Some(&DISPLAY_BLOCK), 813 + (NT::Html, PT::Height) => Some(&HEIGHT_100_PERCENT), 814 + 815 + // Universal fallback for display property 816 + // Per CSS spec, unknown/custom elements should default to inline 817 + // Text nodes will be filtered out before this function is called 818 + (_, PT::Display) => Some(&DISPLAY_INLINE), 819 + 820 + // No default defined for other combinations 821 + _ => None, 822 + } | warning: you should consider adding a `Default` implementation for `WindowId` --> core/src/window.rs:76:5 | 76 | / pub fn new() -> Self { 77 | | WindowId { 78 | | id: LAST_WINDOW_ID.fetch_add(1, AtomicOrdering::SeqCst), 79 | | } 80 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 75 + impl Default for WindowId { 76 + fn default() -> Self { 77 + Self::new() 78 + } 79 + } | warning: you should consider adding a `Default` implementation for `IconKey` --> core/src/window.rs:95:5 | 95 | / pub fn new() -> Self { 96 | | Self { 97 | | icon_id: LAST_ICON_KEY.fetch_add(1, AtomicOrdering::SeqCst), 98 | | } 99 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 94 + impl Default for IconKey { 95 + fn default() -> Self { 96 + Self::new() 97 + } 98 + } | warning: this `impl` can be derived --> core/src/window.rs:303:1 | 303 | / impl Default for MouseCursorType { 304 | | fn default() -> Self { 305 | | MouseCursorType::Default 306 | | } 307 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 265 + #[derive(Default)] 266 ~ pub enum MouseCursorType { 267 ~ #[default] 268 ~ Default, | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/window.rs:399:1 | 399 | impl_vec_mut!(VirtualKeyCode, VirtualKeyCodeVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: comparing with null is better expressed by the `.is_null()` method --> core/src/window.rs:411:1 | 411 | impl_vec_mut!(ScanCode, ScanCodeVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: this `impl` can be derived --> core/src/window.rs:492:1 | 492 | / impl Default for ContextMenuMouseButton { 493 | | fn default() -> Self { 494 | | ContextMenuMouseButton::Right 495 | | } 496 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 486 + #[derive(Default)] 487 ~ pub enum ContextMenuMouseButton { 488 ~ #[default] 489 ~ Right, | warning: this `impl` can be derived --> core/src/window.rs:569:1 | 569 | / impl Default for CursorPosition { 570 | | fn default() -> CursorPosition { 571 | | CursorPosition::Uninitialized 572 | | } 573 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 563 + #[derive(Default)] 564 ~ pub enum CursorPosition { 565 | OutOfWindow(LogicalPosition), 566 ~ #[default] 567 ~ Uninitialized, | warning: this `impl` can be derived --> core/src/window.rs:664:1 | 664 | / impl Default for WindowTheme { 665 | | fn default() -> WindowTheme { 666 | | WindowTheme::LightMode // sorry! 667 | | } 668 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 659 + #[derive(Default)] 660 ~ pub enum WindowTheme { 661 | DarkMode, 662 ~ #[default] 663 ~ LightMode, | warning: this `impl` can be derived --> core/src/window.rs:848:1 | 848 | / impl Default for WindowPosition { 849 | | fn default() -> WindowPosition { 850 | | WindowPosition::Uninitialized 851 | | } 852 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 843 + #[derive(Default)] 844 ~ pub enum WindowPosition { 845 ~ #[default] 846 ~ Uninitialized, | warning: this `impl` can be derived --> core/src/window.rs:862:1 | 862 | / impl Default for ImePosition { 863 | | fn default() -> ImePosition { 864 | | ImePosition::Uninitialized 865 | | } 866 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 857 + #[derive(Default)] 858 ~ pub enum ImePosition { 859 ~ #[default] 860 ~ Uninitialized, | warning: this `impl` can be derived --> core/src/window.rs:1194:1 | 1194 | / impl Default for XWindowType { 1195 | | fn default() -> Self { 1196 | | XWindowType::Normal 1197 | | } 1198 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 1148 + #[derive(Default)] 1149 ~ pub enum XWindowType { 1150 | /// A desktop feature. This can include a single window containing desktop icons with the same ... 1185 | /// This is a normal, top-level window. 1186 ~ #[default] 1187 ~ Normal, | warning: this `impl` can be derived --> core/src/window.rs:1208:1 | 1208 | / impl Default for UserAttentionType { 1209 | | fn default() -> UserAttentionType { 1210 | | UserAttentionType::None 1211 | | } 1212 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 1202 + #[derive(Default)] 1203 ~ pub enum UserAttentionType { 1204 ~ #[default] 1205 ~ None, | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/window.rs:1292:1 | 1292 | impl_vec_mut!(AzStringPair, StringPairVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: this `impl` can be derived --> core/src/window.rs:1386:1 | 1386 | / impl Default for FullScreenMode { 1387 | | fn default() -> Self { 1388 | | FullScreenMode::FastFullScreen 1389 | | } 1390 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 1371 + #[derive(Default)] 1372 ~ pub enum FullScreenMode { 1373 | /// - macOS: If the window is in windowed mode, transitions it slowly to fullscreen mode ... 1377 | /// behaviour). 1378 ~ #[default] 1379 ~ FastFullScreen, | warning: variables can be used directly in the `format!` string --> core/src/window.rs:1519:42 | 1519 | FocusInvalidDomId(dom_id) => write!(f, "Focusing on DOM with invalid ID: {:?}", dom_id), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1519 - FocusInvalidDomId(dom_id) => write!(f, "Focusing on DOM with invalid ID: {:?}", dom_id), 1519 + FocusInvalidDomId(dom_id) => write!(f, "Focusing on DOM with invalid ID: {dom_id:?}"), | warning: variables can be used directly in the `format!` string --> core/src/window.rs:1521:17 | 1521 | write!(f, "Focusing on node with invalid ID: {}", node_id) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1521 - write!(f, "Focusing on node with invalid ID: {}", node_id) 1521 + write!(f, "Focusing on node with invalid ID: {node_id}") | warning: variables can be used directly in the `format!` string --> core/src/window.rs:1524:17 | 1524 | write!(f, "Could not find focus node for path: {}", css_path) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1524 - write!(f, "Could not find focus node for path: {}", css_path) 1524 + write!(f, "Could not find focus node for path: {css_path}") | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/xml.rs:160:1 | 160 | impl_vec_mut!(ComponentArgument, ComponentArgumentVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: comparing with null is better expressed by the `.is_null()` method --> core/src/xml.rs:323:1 | 323 | impl_vec_mut!(ExternalResource, ExternalResourceVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: stripping a prefix manually --> core/src/xml.rs:633:60 | 633 | if let Some(url) = Self::extract_url_value(&trimmed[4..]) { | ^^^^^^^^^^^^^ | note: the prefix was tested here --> core/src/xml.rs:632:13 | 632 | if trimmed.starts_with("url(") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip = note: `#[warn(clippy::manual_strip)]` implied by `#[warn(clippy::all)]` help: try using the `strip_prefix` method | 632 ~ if let Some() = trimmed.strip_prefix("url(") { 633 ~ if let Some(url) = Self::extract_url_value() { | warning: stripping a prefix manually --> core/src/xml.rs:662:23 | 662 | let end = trimmed[1..].find('\'')?; | ^^^^^^^^^^^^ | note: the prefix was tested here --> core/src/xml.rs:661:16 | 661 | } else if trimmed.starts_with('\'') { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip help: try using the `strip_prefix` method | 661 ~ } else if let Some() = trimmed.strip_prefix('\'') { 662 ~ let end = .find('\'')?; | warning: stripping a prefix manually --> core/src/xml.rs:673:23 | 673 | let end = s[1..].find('"')?; | ^^^^^^ | note: the prefix was tested here --> core/src/xml.rs:672:9 | 672 | if s.starts_with('"') { | ^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip help: try using the `strip_prefix` method | 672 ~ if let Some() = s.strip_prefix('"') { 673 ~ let end = .find('"')?; | warning: stripping a prefix manually --> core/src/xml.rs:676:23 | 676 | let end = s[1..].find('\'')?; | ^^^^^^ | note: the prefix was tested here --> core/src/xml.rs:675:16 | 675 | } else if s.starts_with('\'') { | ^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip help: try using the `strip_prefix` method | 675 ~ } else if let Some() = s.strip_prefix('\'') { 676 ~ let end = .find('\'')?; | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:935:32 | 935 | UnknownToken(e) => write!(f, "Unknown token at {}", e), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 935 - UnknownToken(e) => write!(f, "Unknown token at {}", e), 935 + UnknownToken(e) => write!(f, "Unknown token at {e}"), | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:1116:31 | 1116 | ParserError(p) => write!(f, "{}", p), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1116 - ParserError(p) => write!(f, "{}", p), 1116 + ParserError(p) => write!(f, "{p}"), | warning: large size difference between variants --> core/src/xml.rs:1689:1 | 1689 | / pub enum ComponentFieldValue { 1690 | | String(AzString), 1691 | | Bool(bool), 1692 | | I32(i32), ... | 1707 | | StyledDom(StyledDom), | | -------------------- the largest variant contains at least 352 bytes ... | 1711 | |/ Enum { 1712 | || variant: AzString, 1713 | || fields: ComponentFieldNamedValueVec, 1714 | || }, | ||_____- the second-largest variant contains at least 80 bytes ... | 1718 | | RefAny(crate::refany::RefAny), 1719 | | } | |__^ the entire enum is at least 360 bytes | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant help: consider boxing the large fields to reduce the total size of the enum | 1707 - StyledDom(StyledDom), 1707 + StyledDom(Box), | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/xml.rs:1905:1 | 1905 | impl_vec_mut!(ComponentDataModel, ComponentDataModelVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: this `impl` can be derived --> core/src/xml.rs:2229:1 | 2229 | / impl Default for ComponentSource { 2230 | | fn default() -> Self { 2231 | | ComponentSource::UserDefined 2232 | | } 2233 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls help: replace the manual implementation with a derive attribute and mark the default variant | 2220 + #[derive(Default)] 2221 ~ pub enum ComponentSource { 2222 | /// Built into the DLL (HTML elements). Never exported. ... 2226 | /// Defined via JSON/XML at runtime. Can be exported. 2227 ~ #[default] 2228 ~ UserDefined, | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/xml.rs:2380:1 | 2380 | impl_vec_mut!(ComponentDef, ComponentDefVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: comparing with null is better expressed by the `.is_null()` method --> core/src/xml.rs:2427:1 | 2427 | impl_vec_mut!(ComponentLibrary, ComponentLibraryVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: variables can be used directly in the `format!` string --> core/src/xml.rs:2888:21 | 2888 | let type_name = format!("{:?}", node_type); // "Div", "Body", "P", etc. | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 2888 - let type_name = format!("{:?}", node_type); // "Div", "Body", "P", etc. 2888 + let type_name = format!("{node_type:?}"); // "Div", "Body", "P", etc. | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:2900:20 | 2900 | Ok(format!("Dom::create_node(NodeType::{})", type_name).into()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 2900 - Ok(format!("Dom::create_node(NodeType::{})", type_name).into()) 2900 + Ok(format!("Dom::create_node(NodeType::{type_name})").into()) | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:2914:20 | 2914 | Ok(format!("AzDom_create{}()", type_name).into()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 2914 - Ok(format!("AzDom_create{}()", type_name).into()) 2914 + Ok(format!("AzDom_create{type_name}()").into()) | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:2926:16 | 2926 | let text = alloc::format!("{}: {}", field_name, value); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 2926 - let text = alloc::format!("{}: {}", field_name, value); 2926 + let text = alloc::format!("{field_name}: {value}"); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3119:24 | 3119 | lines.push(alloc::format!("{}// Component: {}", indent_str, tag)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3119 - lines.push(alloc::format!("{}// Component: {}", indent_str, tag)); 3119 + lines.push(alloc::format!("{indent_str}// Component: {tag}")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3120:24 | 3120 | lines.push(alloc::format!( | ________________________^ 3121 | | "{}let mut children: Vec = Vec::new();", 3122 | | indent_str 3123 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3130:36 | 3130 | lines.push(alloc::format!( | ____________________________________^ 3131 | | "{}children.push(Dom::create_text(AzString::from_const_str(\"{}\")));", 3132 | | inner_indent, 3133 | | escaped 3134 | | )); | |_________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3137:36 | 3137 | lines.push(alloc::format!( | ____________________________________^ 3138 | | "{}children.push(Dom::create_text(AzString::from(format!(\"{{}}: {{}}\", \"{}\", {}).as_str())));", 3139 | | inner_indent, fname, b 3140 | | )); | |_________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3167:24 | 3167 | lines.push(alloc::format!( | ________________________^ 3168 | | "{}Dom::create_node(NodeType::Div).with_children(children.into())", 3169 | | indent_str 3170 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3175:24 | 3175 | lines.push(alloc::format!("{}/* Component: {} */", indent_str, tag)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3175 - lines.push(alloc::format!("{}/* Component: {} */", indent_str, tag)); 3175 + lines.push(alloc::format!("{indent_str}/* Component: {tag} */")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3176:24 | 3176 | lines.push(alloc::format!( | ________________________^ 3177 | | "{}AzDom root = AzDom_createDiv();", 3178 | | indent_str 3179 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3186:36 | 3186 | lines.push(alloc::format!( | ____________________________________^ 3187 | | "{}AzDom_addChild(&root, AzDom_createText(AzString_fromConstStr(\"{}\")));", 3188 | | inner_indent, escaped 3189 | | )); | |_________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3196:36 | 3196 | lines.push(alloc::format!( | ____________________________________^ 3197 | | "{}AzDom_addChild(&root, {}());", 3198 | | inner_indent, 3199 | | fn_name 3200 | | )); | |_________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3203:36 | 3203 | lines.push(alloc::format!("{}/* field '{}' */", inner_indent, fname)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3203 - lines.push(alloc::format!("{}/* field '{}' */", inner_indent, fname)); 3203 + lines.push(alloc::format!("{inner_indent}/* field '{fname}' */")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3208:24 | 3208 | lines.push(alloc::format!("{}return root;", indent_str)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3208 - lines.push(alloc::format!("{}return root;", indent_str)); 3208 + lines.push(alloc::format!("{indent_str}return root;")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3213:24 | 3213 | lines.push(alloc::format!("{}// Component: {}", indent_str, tag)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3213 - lines.push(alloc::format!("{}// Component: {}", indent_str, tag)); 3213 + lines.push(alloc::format!("{indent_str}// Component: {tag}")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3214:24 | 3214 | lines.push(alloc::format!( | ________________________^ 3215 | | "{}auto root = Dom::create_div();", 3216 | | indent_str 3217 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3224:36 | 3224 | lines.push(alloc::format!( | ____________________________________^ 3225 | | "{}root.add_child(Dom::create_text(\"{}\"));", 3226 | | inner_indent, 3227 | | escaped 3228 | | )); | |_________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3235:36 | 3235 | lines.push(alloc::format!( | ____________________________________^ 3236 | | "{}root.add_child({}());", 3237 | | inner_indent, 3238 | | fn_name 3239 | | )); | |_________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3242:36 | 3242 | lines.push(alloc::format!("{}// field '{}'", inner_indent, fname)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3242 - lines.push(alloc::format!("{}// field '{}'", inner_indent, fname)); 3242 + lines.push(alloc::format!("{inner_indent}// field '{fname}'")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3247:24 | 3247 | lines.push(alloc::format!("{}return root;", indent_str)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3247 - lines.push(alloc::format!("{}return root;", indent_str)); 3247 + lines.push(alloc::format!("{indent_str}return root;")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3252:24 | 3252 | lines.push(alloc::format!("{}# Component: {}", indent_str, tag)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3252 - lines.push(alloc::format!("{}# Component: {}", indent_str, tag)); 3252 + lines.push(alloc::format!("{indent_str}# Component: {tag}")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3253:24 | 3253 | lines.push(alloc::format!("{}root = Dom.div()", indent_str)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3253 - lines.push(alloc::format!("{}root = Dom.div()", indent_str)); 3253 + lines.push(alloc::format!("{indent_str}root = Dom.div()")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3264:36 | 3264 | lines.push(alloc::format!( | ____________________________________^ 3265 | | "{}root.add_child(Dom.text('{}'))", 3266 | | inner_indent, 3267 | | escaped 3268 | | )); | |_________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3275:36 | 3275 | lines.push(alloc::format!( | ____________________________________^ 3276 | | "{}root.add_child({}())", 3277 | | inner_indent, 3278 | | fn_name 3279 | | )); | |_________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3282:36 | 3282 | lines.push(alloc::format!("{}# field '{}'", inner_indent, fname)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3282 - lines.push(alloc::format!("{}# field '{}'", inner_indent, fname)); 3282 + lines.push(alloc::format!("{inner_indent}# field '{fname}'")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3287:24 | 3287 | lines.push(alloc::format!("{}return root", indent_str)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3287 - lines.push(alloc::format!("{}return root", indent_str)); 3287 + lines.push(alloc::format!("{indent_str}return root")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3321:22 | 3321 | let model_name = format!("{}Data", display_name); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3321 - let model_name = format!("{}Data", display_name); 3321 + let model_name = format!("{display_name}Data"); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3325:37 | 3325 | description: AzString::from(format!("HTML <{}> element", tag).as_str()), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3325 - description: AzString::from(format!("HTML <{}> element", tag).as_str()), 3325 + description: AzString::from(format!("HTML <{tag}> element").as_str()), | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:3330:41 | 3330 | description: AzString::from(format!("Data model for <{}>", tag).as_str()), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3330 - description: AzString::from(format!("Data model for <{}>", tag).as_str()), 3330 + description: AzString::from(format!("Data model for <{tag}>").as_str()), | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:4295:61 | 4295 | .with_children(alloc::vec![Dom::create_text(alloc::format!("Item {}", i))].into()), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 4295 - .with_children(alloc::vec![Dom::create_text(alloc::format!("Item {}", i))].into()), 4295 + .with_children(alloc::vec![Dom::create_text(alloc::format!("Item {i}"))].into()), | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:4374:17 | 4374 | let label = alloc::format!("map: data_json={}", data_str); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 4374 - let label = alloc::format!("map: data_json={}", data_str); 4374 + let label = alloc::format!("map: data_json={data_str}"); | warning: comparing with null is better expressed by the `.is_null()` method --> core/src/xml.rs:4653:1 | 4653 | impl_vec_mut!(XmlNodeChild, XmlNodeChildVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: comparing with null is better expressed by the `.is_null()` method --> core/src/xml.rs:4722:1 | 4722 | impl_vec_mut!(XmlNode, XmlNodeVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: this lifetime isn't used in the impl --> core/src/xml.rs:4804:6 | 4804 | impl<'a> fmt::Display for CompileError { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes = note: `#[warn(clippy::extra_unused_lifetimes)]` implied by `#[warn(clippy::all)]` warning: variables can be used directly in the `format!` string --> core/src/xml.rs:4808:23 | 4808 | Dom(d) => write!(f, "{}", d), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 4808 - Dom(d) => write!(f, "{}", d), 4808 + Dom(d) => write!(f, "{d}"), | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:4809:23 | 4809 | Xml(s) => write!(f, "{}", s), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 4809 - Xml(s) => write!(f, "{}", s), 4809 + Xml(s) => write!(f, "{s}"), | warning: this lifetime isn't used in the impl --> core/src/xml.rs:4916:6 | 4916 | impl<'a> fmt::Display for DomXmlParseError { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes warning: variables can be used directly in the `format!` string --> core/src/xml.rs:4937:23 | 4937 | Xml(e) => write!(f, "Error parsing XML: {}", e), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 4937 - Xml(e) => write!(f, "Error parsing XML: {}", e), 4937 + Xml(e) => write!(f, "Error parsing XML: {e}"), | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:4944:29 | 4944 | RenderDom(e) => write!(f, "Error rendering DOM: {}", e), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 4944 - RenderDom(e) => write!(f, "Error rendering DOM: {}", e), 4944 + RenderDom(e) => write!(f, "Error rendering DOM: {e}"), | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:4945:29 | 4945 | Component(c) => write!(f, "Error parsing component in node:\r\n{}", c), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 4945 - Component(c) => write!(f, "Error parsing component in node:\r\n{}", c), 4945 + Component(c) => write!(f, "Error parsing component in node:\r\n{c}"), | warning: this lifetime isn't used in the impl --> core/src/xml.rs:4951:6 | 4951 | impl<'a> fmt::Display for ComponentParseError { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes warning: variables can be used directly in the `format!` string --> core/src/xml.rs:4960:37 | 4960 | MissingName(arg_pos) => write!( | _____________________________________^ 4961 | | f, 4962 | | "Argument at position {} is either empty or has no name", 4963 | | arg_pos 4964 | | ), | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:5001:39 | 5001 | UnknownComponent(name) => write!(f, "Unknown component: \"{}\"", name), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 5001 - UnknownComponent(name) => write!(f, "Unknown component: \"{}\"", name), 5001 + UnknownComponent(name) => write!(f, "Unknown component: \"{name}\""), | warning: this lifetime isn't used in the impl --> core/src/xml.rs:5006:6 | 5006 | impl<'a> fmt::Display for RenderDomError { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes warning: variables can be used directly in the `format!` string --> core/src/xml.rs:5010:29 | 5010 | Component(c) => write!(f, "{}", c), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 5010 - Component(c) => write!(f, "{}", c), 5010 + Component(c) => write!(f, "{c}"), | warning: the following explicit lifetimes could be elided: 'a --> core/src/xml.rs:5018:22 | 5018 | pub fn get_html_node<'a>(root_nodes: &'a [XmlNodeChild]) -> Result<&'a XmlNode, DomXmlParseError> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 5018 - pub fn get_html_node<'a>(root_nodes: &'a [XmlNodeChild]) -> Result<&'a XmlNode, DomXmlParseError> { 5018 + pub fn get_html_node(root_nodes: &[XmlNodeChild]) -> Result<&XmlNode, DomXmlParseError> { | warning: the `Err`-variant returned from this function is very large --> core/src/xml.rs:5018:61 | 4751 | RenderDom(RenderDomError), | ------------------------- the largest variant contains at least 184 bytes 4752 | /// Something went wrong while parsing an XML component 4753 | Component(ComponentParseError), | ------------------------------ the variant `Component` contains at least 184 bytes 4754 | /// Error parsing global CSS in head node 4755 | Css(CssParseErrorOwned), | ----------------------- the variant `Css` contains at least 176 bytes ... 5018 | pub fn get_html_node<'a>(root_nodes: &'a [XmlNodeChild]) -> Result<&'a XmlNode, DomXmlParseError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `xml::DomXmlParseError`, for example by boxing large elements or replacing it with `Box` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err = note: `#[warn(clippy::result_large_err)]` implied by `#[warn(clippy::all)]` warning: the following explicit lifetimes could be elided: 'a --> core/src/xml.rs:5044:22 | 5044 | pub fn get_body_node<'a>(root_nodes: &'a [XmlNodeChild]) -> Result<&'a XmlNode, DomXmlParseError> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 5044 - pub fn get_body_node<'a>(root_nodes: &'a [XmlNodeChild]) -> Result<&'a XmlNode, DomXmlParseError> { 5044 + pub fn get_body_node(root_nodes: &[XmlNodeChild]) -> Result<&XmlNode, DomXmlParseError> { | warning: the `Err`-variant returned from this function is very large --> core/src/xml.rs:5044:61 | 4751 | RenderDom(RenderDomError), | ------------------------- the largest variant contains at least 184 bytes 4752 | /// Something went wrong while parsing an XML component 4753 | Component(ComponentParseError), | ------------------------------ the variant `Component` contains at least 184 bytes 4754 | /// Error parsing global CSS in head node 4755 | Css(CssParseErrorOwned), | ----------------------- the variant `Css` contains at least 176 bytes ... 5044 | pub fn get_body_node<'a>(root_nodes: &'a [XmlNodeChild]) -> Result<&'a XmlNode, DomXmlParseError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `xml::DomXmlParseError`, for example by boxing large elements or replacing it with `Box` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err warning: the following explicit lifetimes could be elided: 'a --> core/src/xml.rs:5068:28 | 5068 | fn find_body_recursive<'a>(nodes: &'a [XmlNodeChild]) -> Option<&'a XmlNode> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 5068 - fn find_body_recursive<'a>(nodes: &'a [XmlNodeChild]) -> Option<&'a XmlNode> { 5068 + fn find_body_recursive(nodes: &[XmlNodeChild]) -> Option<&XmlNode> { | warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:5115:36 | 5115 | .find(|n| normalize_casing(&n.key.as_str()).as_str() == attribute) | ^^^^^^^^^^^^^^^ help: change this to: `n.key.as_str()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: the `Err`-variant returned from this function is very large --> core/src/xml.rs:5187:6 | 4751 | RenderDom(RenderDomError), | ------------------------- the largest variant contains at least 184 bytes 4752 | /// Something went wrong while parsing an XML component 4753 | Component(ComponentParseError), | ------------------------------ the variant `Component` contains at least 184 bytes 4754 | /// Error parsing global CSS in head node 4755 | Css(CssParseErrorOwned), | ----------------------- the variant `Css` contains at least 176 bytes ... 5187 | ) -> Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `xml::DomXmlParseError`, for example by boxing large elements or replacing it with `Box` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err warning: the `Err`-variant returned from this function is very large --> core/src/xml.rs:5200:6 | 4751 | RenderDom(RenderDomError), | ------------------------- the largest variant contains at least 184 bytes 4752 | /// Something went wrong while parsing an XML component 4753 | Component(ComponentParseError), | ------------------------------ the variant `Component` contains at least 184 bytes 4754 | /// Error parsing global CSS in head node 4755 | Css(CssParseErrorOwned), | ----------------------- the variant `Css` contains at least 176 bytes ... 5200 | ) -> Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `xml::DomXmlParseError`, for example by boxing large elements or replacing it with `Box` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:5216:36 | 5216 | render_dom_from_body_node_fast(&body_node, global_style, component_map, max_width) | ^^^^^^^^^^ help: change this to: `body_node` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: the `Err`-variant returned from this function is very large --> core/src/xml.rs:5231:6 | 4751 | RenderDom(RenderDomError), | ------------------------- the largest variant contains at least 184 bytes 4752 | /// Something went wrong while parsing an XML component 4753 | Component(ComponentParseError), | ------------------------------ the variant `Component` contains at least 184 bytes 4754 | /// Error parsing global CSS in head node 4755 | Css(CssParseErrorOwned), | ----------------------- the variant `Css` contains at least 176 bytes ... 5231 | ) -> Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `xml::DomXmlParseError`, for example by boxing large elements or replacing it with `Box` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err warning: redundant closure --> core/src/xml.rs:5249:18 | 5249 | .map_err(|e| DomXmlParseError::from(e))?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `DomXmlParseError::from` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:5248:41 | 5248 | let body_dom = xml_node_to_dom_fast(&body_node, component_map, false) | ^^^^^^^^^^ help: change this to: `body_node` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: calls to `push` immediately after creation --> core/src/xml.rs:5266:9 | 5266 | / let mut css_vec: Vec = Vec::new(); 5267 | | css_vec.push(css); | |__________________________^ help: consider using the `vec![]` macro: `let css_vec: Vec = vec![..];` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push warning: the `Err`-variant returned from this function is very large --> core/src/xml.rs:5280:6 | 4787 | Dom(RenderDomError), | ------------------- the variant `Dom` contains at least 184 bytes 4788 | Xml(DomXmlParseError), | --------------------- the largest variant contains at least 192 bytes 4789 | Css(CssParseErrorOwned), | ----------------------- the variant `Css` contains at least 176 bytes ... 5280 | ) -> Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `xml::CompileError`, for example by boxing large elements or replacing it with `Box` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:5281:35 | 5281 | let html_node = get_html_node(&root_nodes)?; | ^^^^^^^^^^^ help: change this to: `root_nodes` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:5300:9 | 5300 | &body_node, | ^^^^^^^^^^ help: change this to: `body_node` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: variables can be used directly in the `format!` string --> core/src/xml.rs:5314:18 | 5314 | .map(|l| format!(" {}", l)) | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 5314 - .map(|l| format!(" {}", l)) 5314 + .map(|l| format!(" {l}")) | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:5324:26 | 5324 | .map(|l| format!("{}{}{}", t, t, l)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 5324 - .map(|l| format!("{}{}{}", t, t, l)) 5324 + .map(|l| format!("{t}{t}{l}")) | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:5328:13 | 5328 | / format!( 5329 | | " const {}_PROPERTIES: &[NodeDataInlineCssProperty] = \ 5330 | | &[\r\n{}\r\n{}];\r\n{}const {}: NodeDataInlineCssPropertyVec = \ 5331 | | NodeDataInlineCssPropertyVec::from_const_slice({}_PROPERTIES);", 5332 | | k, v, t, t, k, k 5333 | | ) | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:5336:16 | 5336 | .join(&format!("{}\r\n\r\n", t)); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 5336 - .join(&format!("{}\r\n\r\n", t)); 5336 + .join(&format!("{t}\r\n\r\n")); | warning: `format!` in `format!` args --> core/src/xml.rs:5364:23 | 5364 | let source_code = format!( | _______________________^ 5365 | | "#![windows_subsystem = \"windows\"]\r\n//! Auto-generated UI source \ 5366 | | code\r\n{}\r\n{}\r\n\r\n{}{}", 5367 | | imports, ... | 5392 | | main_func, 5393 | | ); | |_____^ | = help: combine the `format!(..)` arguments with the outer `format!(..)` call = help: or consider changing `format!` to `format_args!` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args = note: `#[warn(clippy::format_in_format_args)]` implied by `#[warn(clippy::all)]` warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:5410:42 | 5410 | let name = &normalize_casing(&name); | ^^^^^ help: change this to: `name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: variables can be used directly in the `format!` string --> core/src/xml.rs:5413:26 | 5413 | .map(|l| format!(" {}", l)) | ^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 5413 - .map(|l| format!(" {}", l)) 5413 + .map(|l| format!(" {l}")) | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:5419:13 | 5419 | / format!( 5420 | | "#[allow(unused_imports)]\r\npub mod {} {{\r\n use azul::dom::Dom;\r\n use \ 5421 | | azul::str::String as AzString;\r\n{}\r\n}}", 5422 | | name, f 5423 | | ) | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:5430:18 | 5430 | .map(|l| format!(" {}", l)) | ^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 5430 - .map(|l| format!(" {}", l)) 5430 + .map(|l| format!(" {l}")) | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:5437:9 | 5437 | format!("pub mod components {{\r\n{}\r\n}}", cs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 5437 - format!("pub mod components {{\r\n{}\r\n}}", cs) 5437 + format!("pub mod components {{\r\n{cs}\r\n}}") | warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:5447:31 | 5447 | args.sort_by(|a, b| b.cmp(&a)); | ^^ help: change this to: `a` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:5457:44 | 5457 | let component_name = &normalize_casing(&component_name); | ^^^^^^^^^^^^^^^ help: change this to: `component_name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: variables can be used directly in the `format!` string --> core/src/xml.rs:5461:18 | 5461 | .map(|l| format!(" {}", l)) | ^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 5461 - .map(|l| format!(" {}", l)) 5461 + .map(|l| format!(" {l}")) | warning: the `Err`-variant returned from this function is very large --> core/src/xml.rs:5531:6 | 4852 | Component(ComponentError), | ------------------------- the variant `Component` contains at least 128 bytes 4853 | /// Error parsing the CSS on the component style 4854 | CssError(CssParseErrorOwned), | ---------------------------- the largest variant contains at least 176 bytes ... 5531 | ) -> Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `xml::RenderDomError`, for example by boxing large elements or replacing it with `Box` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err warning: float has excessive precision --> core/src/xml.rs:5715:40 | 5715 | const KAPPA: f32 = 0.5522847498; | ^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision help: consider changing the type or truncating it to | 5715 - const KAPPA: f32 = 0.5522847498; 5715 + const KAPPA: f32 = 0.552_284_8; | warning: parameter is only used in recursion --> core/src/xml.rs:5529:5 | 5529 | component_map: &'a ComponentMap, | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_component_map` | note: parameter used here --> core/src/xml.rs:5810:66 | 5810 | let child_dom = xml_node_to_dom_fast(child_node, component_map, child_inside_svg)?; | ^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion = note: `#[warn(clippy::only_used_in_recursion)]` implied by `#[warn(clippy::all)]` warning: you should consider adding a `Default` implementation for `CompactDomBuilder` --> core/src/xml.rs:5838:5 | 5838 | / pub fn new() -> Self { 5839 | | Self { 5840 | | hierarchy: Vec::new(), 5841 | | node_data: Vec::new(), ... | 5845 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 5837 + impl Default for CompactDomBuilder { 5838 + fn default() -> Self { 5839 + Self::new() 5840 + } 5841 + } | warning: the `Err`-variant returned from this function is very large --> core/src/xml.rs:5942:6 | 4852 | Component(ComponentError), | ------------------------- the variant `Component` contains at least 128 bytes 4853 | /// Error parsing the CSS on the component style 4854 | CssError(CssParseErrorOwned), | ---------------------------- the largest variant contains at least 176 bytes ... 5942 | ) -> Result<(), RenderDomError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `xml::RenderDomError`, for example by boxing large elements or replacing it with `Box` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err warning: float has excessive precision --> core/src/xml.rs:6120:40 | 6120 | const KAPPA: f32 = 0.5522847498; | ^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision help: consider changing the type or truncating it to | 6120 - const KAPPA: f32 = 0.5522847498; 6120 + const KAPPA: f32 = 0.552_284_8; | warning: parameter is only used in recursion --> core/src/xml.rs:5939:5 | 5939 | component_map: &'a ComponentMap, | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_component_map` | note: parameter used here --> core/src/xml.rs:6216:50 | 6216 | xml_node_to_fast_dom(child_node, component_map, child_inside_svg, builder)?; | ^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion warning: the `Err`-variant returned from this function is very large --> core/src/xml.rs:6237:6 | 4852 | Component(ComponentError), | ------------------------- the variant `Component` contains at least 128 bytes 4853 | /// Error parsing the CSS on the component style 4854 | CssError(CssParseErrorOwned), | ---------------------------- the largest variant contains at least 176 bytes ... 6237 | ) -> Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `xml::RenderDomError`, for example by boxing large elements or replacing it with `Box` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:6297:37 | 6297 | format_args_dynamic(id, &filtered_xml_attributes) | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `filtered_xml_attributes` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:6309:40 | 6309 | format_args_dynamic(class, &filtered_xml_attributes) | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `filtered_xml_attributes` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6316:30 | 6316 | dom_string.push_str(&format!( | ______________________________^ 6317 | | "\r\n{t0}.with_ids_and_classes({{\r\n{t}const IDS_AND_CLASSES_{id}: &[IdOrClass] = \ 6318 | | &[\r\n{t}{ids_and_classes}\r\n{t}];\r\\ 6319 | | n{t}IdOrClassVec::from_const_slice(IDS_AND_CLASSES_{id})\r\n{t0}}})", ... | 6323 | | id = id 6324 | | )); | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:6329:41 | 6329 | .map(|f| format_args_dynamic(f, &filtered_xml_attributes)) | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `filtered_xml_attributes` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6333:42 | 6333 | true => dom_string.push_str(&format!("\r\n{}.with_tab_index(TabIndex::Auto)", t)), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 6333 - true => dom_string.push_str(&format!("\r\n{}.with_tab_index(TabIndex::Auto)", t)), 6333 + true => dom_string.push_str(&format!("\r\n{t}.with_tab_index(TabIndex::Auto)")), | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6334:43 | 6334 | false => dom_string.push_str(&format!( | ___________________________________________^ 6335 | | "\r\n{}.with_tab_index(TabIndex::NoKeyboardFocus)", 6336 | | t 6337 | | )), | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:6343:45 | 6343 | .map(|val| format_args_dynamic(val, &filtered_xml_attributes)) | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `filtered_xml_attributes` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6347:39 | 6347 | 0 => dom_string.push_str(&format!("\r\n{}.with_tab_index(TabIndex::Auto)", t)), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 6347 - 0 => dom_string.push_str(&format!("\r\n{}.with_tab_index(TabIndex::Auto)", t)), 6347 + 0 => dom_string.push_str(&format!("\r\n{t}.with_tab_index(TabIndex::Auto)")), | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6352:39 | 6352 | _ => dom_string.push_str(&format!( | _______________________________________^ 6353 | | "\r\n{}.with_tab_index(TabIndex::NoKeyboardFocus)", 6354 | | t 6355 | | )), | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: manual implementation of an assign operation --> core/src/xml.rs:6444:21 | 6444 | current_idx = current_idx + start_offset; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current_idx += start_offset` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern = note: `#[warn(clippy::assign_op_pattern)]` implied by `#[warn(clippy::all)]` warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:6493:36 | 6493 | s.push_str(&resolved_var); | ^^^^^^^^^^^^^ help: change this to: `resolved_var` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/xml.rs:6507:28 | 6507 | s.push_str(&dynamic_str); | ^^^^^^^^^^^^ help: change this to: `dynamic_str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6563:34 | 6563 | final_lines.push(format!("{}{}", RETURN, line)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 6563 - final_lines.push(format!("{}{}", RETURN, line)); 6563 + final_lines.push(format!("{RETURN}{line}")); | warning: unneeded `return` statement --> core/src/xml.rs:6702:9 | 6702 | return cur_pathgroup_scan == path_groups.len() - 1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 6702 - return cur_pathgroup_scan == path_groups.len() - 1; 6702 + cur_pathgroup_scan == path_groups.len() - 1 | warning: using `clone` on type `NodeTypeTag` which implements the `Copy` trait --> core/src/xml.rs:6725:50 | 6725 | if !b.iter().any(|t| **t == Type(tag.clone())) { | ^^^^^^^^^^^ help: try dereferencing it: `*tag` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: the `Err`-variant returned from this function is very large --> core/src/xml.rs:6790:6 | 4787 | Dom(RenderDomError), | ------------------- the variant `Dom` contains at least 184 bytes 4788 | Xml(DomXmlParseError), | --------------------- the largest variant contains at least 192 bytes 4789 | Css(CssParseErrorOwned), | ----------------------- the variant `Css` contains at least 176 bytes ... 6790 | ) -> Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `xml::CompileError`, for example by boxing large elements or replacing it with `Box` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6868:27 | 6868 | css_blocks.insert(format!("CSS_MATCH_{:09}", matcher_hash), css_strings); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 6868 - css_blocks.insert(format!("CSS_MATCH_{:09}", matcher_hash), css_strings); 6868 + css_blocks.insert(format!("CSS_MATCH_{matcher_hash:09}"), css_strings); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6869:30 | 6869 | dom_string.push_str(&format!( | ______________________________^ 6870 | | "\r\n{}.with_inline_css_props(CSS_MATCH_{:09})", 6871 | | t2, matcher_hash 6872 | | )); | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: useless use of `format!` --> core/src/xml.rs:6878:30 | 6878 | dom_string.push_str(&format!("\r\n.with_children(DomVec::from_vec(vec![\r\n")); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"\r\n.with_children(DomVec::from_vec(vec![\r\n".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` implied by `#[warn(clippy::all)]` warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6906:46 | 6906 | dom_string.push_str(&format!( | ______________________________________________^ 6907 | | "{}Dom::create_text(\"{}\".into()),\r\n", 6908 | | t, escaped 6909 | | )); | |_________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6914:30 | 6914 | dom_string.push_str(&format!("\r\n{}]))", t)); | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 6914 - dom_string.push_str(&format!("\r\n{}]))", t)); 6914 + dom_string.push_str(&format!("\r\n{t}]))")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6954:21 | 6954 | format!("format!(\"{{:{}}}\", {}).into()", spec, var_name) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 6954 - format!("format!(\"{{:{}}}\", {}).into()", spec, var_name) 6954 + format!("format!(\"{{:{spec}}}\", {var_name}).into()") | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6959:23 | 6959 | Str(s) => format!("AzString::from_const_str(\"{}\")", s), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 6959 - Str(s) => format!("AzString::from_const_str(\"{}\")", s), 6959 + Str(s) => format!("AzString::from_const_str(\"{s}\")"), | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6970:49 | 6970 | formatted_str.push_str(&format!("{{{}:{}}}", variable_name, spec)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 6970 - formatted_str.push_str(&format!("{{{}:{}}}", variable_name, spec)); 6970 + formatted_str.push_str(&format!("{{{variable_name}:{spec}}}")); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:6972:49 | 6972 | formatted_str.push_str(&format!("{{{}}}", variable_name)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 6972 - formatted_str.push_str(&format!("{{{}}}", variable_name)); 6972 + formatted_str.push_str(&format!("{{{variable_name}}}")); | warning: the following explicit lifetimes could be elided: 'a --> core/src/xml.rs:6999:36 | 6999 | fn compile_node_to_rust_code_inner<'a>( | ^^ 7000 | node: &XmlNode, 7001 | component_map: &'a ComponentMap, | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 6999 ~ fn compile_node_to_rust_code_inner( 7000 | node: &XmlNode, 7001 ~ component_map: &ComponentMap, | warning: the `Err`-variant returned from this function is very large --> core/src/xml.rs:7007:6 | 4787 | Dom(RenderDomError), | ------------------- the variant `Dom` contains at least 184 bytes 4788 | Xml(DomXmlParseError), | --------------------- the largest variant contains at least 192 bytes 4789 | Css(CssParseErrorOwned), | ----------------------- the variant `Css` contains at least 176 bytes ... 7007 | ) -> Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `xml::CompileError`, for example by boxing large elements or replacing it with `Box` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err warning: variables can be used directly in the `format!` string --> core/src/xml.rs:7040:17 | 7040 | format!("{}Dom::create_node(NodeType::{:?})", t2, node_type) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 7040 - format!("{}Dom::create_node(NodeType::{:?})", t2, node_type) 7040 + format!("{t2}Dom::create_node(NodeType::{node_type:?})") | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:7045:9 | 7045 | / format!( 7046 | | "{}Dom::create_node(NodeType::Div) /* {} */", 7047 | | t2, component_name 7048 | | ) | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:7124:27 | 7124 | css_blocks.insert(format!("CSS_MATCH_{:09}", matcher_hash), css_strings); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 7124 - css_blocks.insert(format!("CSS_MATCH_{:09}", matcher_hash), css_strings); 7124 + css_blocks.insert(format!("CSS_MATCH_{matcher_hash:09}"), css_strings); | warning: variables can be used directly in the `format!` string --> core/src/xml.rs:7125:30 | 7125 | dom_string.push_str(&format!( | ______________________________^ 7126 | | "\r\n{}.with_inline_css_props(CSS_MATCH_{:09})", 7127 | | t2, matcher_hash 7128 | | )); | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: variables can be used directly in the `format!` string --> core/src/xml.rs:7167:29 | 7167 | Some(Ok(format!( | _____________________________^ 7168 | | "{}Dom::create_text(\"{}\".into())", 7169 | | t2, escaped 7170 | | ))) | |_____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: useless use of `format!` --> core/src/xml.rs:7175:16 | 7175 | .join(&format!(",\r\n")); | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `",\r\n".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format warning: variables can be used directly in the `format!` string --> core/src/xml.rs:7178:30 | 7178 | dom_string.push_str(&format!( | ______________________________^ 7179 | | "\r\n{}.with_children(DomVec::from_vec(vec![\r\n{}\r\n{}]))", 7180 | | t2, children_string, t2 7181 | | )); | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args warning: `azul-core` (lib) generated 496 warnings (run `cargo clippy --fix --lib -p azul-core` to apply 374 suggestions) Checking azul-layout v0.0.9 (/home/runner/work/azul/azul/layout) warning: unknown lint: `function_casts_as_integer` --> layout/src/lib.rs:33:5 | 33 | function_casts_as_integer, // widget callback pointer identity | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unknown_lints)]` on by default warning: unknown lint: `mismatched_lifetime_syntaxes` --> layout/src/lib.rs:35:5 | 35 | mismatched_lifetime_syntaxes, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: variables can be used directly in the `format!` string --> layout/src/url.rs:89:13 | 89 | format!(":{}", port) | ^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args note: the lint level is defined here --> layout/src/lib.rs:14:9 | 14 | #![warn(clippy::all)] | ^^^^^^^^^^^ = note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::all)]` help: change this to | 89 - format!(":{}", port) 89 + format!(":{port}") | warning: variables can be used directly in the `format!` string --> layout/src/url.rs:92:20 | 92 | let href = format!("{}://{}{}{}", scheme, host, port_str, path); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 92 - let href = format!("{}://{}{}{}", scheme, host, port_str, path); 92 + let href = format!("{scheme}://{host}{port_str}{path}"); | warning: comparing with null is better expressed by the `.is_null()` method --> layout/src/file.rs:176:1 | 176 | impl_vec_mut!(DirEntry, DirEntryVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: `#[warn(clippy::cmp_null)]` implied by `#[warn(clippy::all)]` = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: comparing with null is better expressed by the `.is_null()` method --> layout/src/http.rs:150:1 | 150 | impl_vec_mut!(HttpHeader, HttpHeaderVec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null = note: this warning originates in the macro `impl_vec_mut` (in Nightly builds, run with -Z macro-backtrace for more info) warning: deref which would be done by auto-deref --> layout/src/icon.rs:104:48 | 104 | return create_image_icon_from_original(&*img, original_icon_dom, system_style); | ^^^^^ help: try: `&img` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref = note: `#[warn(clippy::explicit_auto_deref)]` implied by `#[warn(clippy::all)]` warning: deref which would be done by auto-deref --> layout/src/icon.rs:109:47 | 109 | return create_font_icon_from_original(&*font_icon, original_icon_dom, system_style); | ^^^^^^^^^^^ help: try: `&font_icon` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref warning: variables can be used directly in the `format!` string --> layout/src/fragmentation.rs:200:41 | 200 | PageSlotContent::Text(s) => write!(f, "Text({:?})", s), | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 200 - PageSlotContent::Text(s) => write!(f, "Text({:?})", s), 200 + PageSlotContent::Text(s) => write!(f, "Text({s:?})"), | warning: variables can be used directly in the `format!` string --> layout/src/fragmentation.rs:201:51 | 201 | PageSlotContent::PageNumber(style) => write!(f, "PageNumber({:?})", style), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 201 - PageSlotContent::PageNumber(style) => write!(f, "PageNumber({:?})", style), 201 + PageSlotContent::PageNumber(style) => write!(f, "PageNumber({style:?})"), | warning: variables can be used directly in the `format!` string --> layout/src/fragmentation.rs:203:50 | 203 | PageSlotContent::RunningHeader(s) => write!(f, "RunningHeader({:?})", s), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 203 - PageSlotContent::RunningHeader(s) => write!(f, "RunningHeader({:?})", s), 203 + PageSlotContent::RunningHeader(s) => write!(f, "RunningHeader({s:?})"), | warning: this `if` statement can be collapsed --> layout/src/fragmentation.rs:833:5 | 833 | / if is_forced_break(&break_before) { 834 | | if ctx.current_y > 0.0 { 835 | | return BreakDecision::ForceBreakBefore; 836 | | } 837 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` implied by `#[warn(clippy::all)]` help: collapse nested if block | 833 ~ if is_forced_break(&break_before) 834 ~ && ctx.current_y > 0.0 { 835 | return BreakDecision::ForceBreakBefore; 836 ~ } | warning: `azul-layout` (lib) generated 12 warnings (run `cargo clippy --fix --lib -p azul-layout` to apply 8 suggestions) Finished `dev` profile [unoptimized + debuginfo] target(s) in 14.42s