fixed clippy warnings

This commit is contained in:
Dmitry
2025-10-25 13:46:59 +03:00
parent 7b03115549
commit d7152a9f4d
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ fn colorize(handle: Handle<UiNode>, ui: &UserInterface, index: &mut usize) {
if let Some(decorator) = node.cast::<Decorator>() {
if node.parent().is_some() {
let new_brush = if *index % 2 == 0 {
let new_brush = if (*index).is_multiple_of(2) {
ui.style.property(Style::BRUSH_PRIMARY)
} else {
ui.style.property(Style::BRUSH_LIGHTER_PRIMARY)
+1 -1
View File
@@ -1355,7 +1355,7 @@ where
if val >= begin && val < end {
let record_size = std::mem::size_of::<PoolRecord<T>>();
let record_location = (val - offset_of!(PoolRecord<T>, payload)) - begin;
if record_location % record_size == 0 {
if record_location.is_multiple_of(record_size) {
let index = record_location / record_size;
let index = u32::try_from(index).expect("Index overflowed u32");
return self.handle_from_index(index);
+1 -1
View File
@@ -305,7 +305,7 @@ impl LogPanel {
let ctx = &mut ui.build_ctx();
let item = BorderBuilder::new(
WidgetBuilder::new()
.with_background(if count % 2 == 0 {
.with_background(if count.is_multiple_of(2) {
ctx.style.property(Style::BRUSH_LIGHT)
} else {
ctx.style.property(Style::BRUSH_DARK)