Skip to content

Commit 02249ed

Browse files
authored
Merge pull request #128 from ornlneutronimaging/fix/clippy-f32-fallback-and-readme-doi
Fix clippy float-literal-f32-fallback (rustc 1.97) + README concept DOI
2 parents cfc6795 + 4927ad4 commit 02249ed

6 files changed

Lines changed: 69 additions & 65 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Documentation](https://img.shields.io/badge/docs-mdBook-blue.svg)](https://ornlneutronimaging.github.io/rustpix/)
55
[![Crates.io](https://img.shields.io/crates/v/rustpix-core.svg)](https://crates.io/crates/rustpix-core)
66
[![PyPI](https://img.shields.io/pypi/v/rustpix.svg)](https://pypi.org/project/rustpix/)
7-
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18496371.svg)](https://doi.org/10.5281/zenodo.18496371)
7+
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18496370.svg)](https://doi.org/10.5281/zenodo.18496370)
88
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
99

1010
High-performance pixel detector data processing for neutron imaging. Supports Timepix3 (TPX3) with 96M+ hits/sec throughput. Features multiple clustering algorithms, centroid extraction, and Python bindings.
@@ -232,7 +232,7 @@ If you use rustpix in your research, please cite:
232232
author = {{ORNL Neutron Imaging Team}},
233233
year = {2026},
234234
url = {https://github.com/ornlneutronimaging/rustpix},
235-
doi = {10.5281/zenodo.18496371}
235+
doi = {10.5281/zenodo.18496370}
236236
}
237237
```
238238

rustpix-gui/src/ui/control_panel.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ impl RustpixApp {
226226
// Container frame for the toggle group
227227
egui::Frame::new()
228228
.fill(colors.bg_dark)
229-
.stroke(Stroke::new(1.0, colors.border))
229+
.stroke(Stroke::new(1.0_f32, colors.border))
230230
.corner_radius(CornerRadius::same(4))
231231
.inner_margin(egui::Margin::same(2))
232232
.show(ui, |ui| {
@@ -517,7 +517,7 @@ impl RustpixApp {
517517

518518
egui::Frame::new()
519519
.fill(colors.bg_dark)
520-
.stroke(Stroke::new(1.0, colors.border))
520+
.stroke(Stroke::new(1.0_f32, colors.border))
521521
.corner_radius(CornerRadius::same(4))
522522
.inner_margin(egui::Margin::same(2))
523523
.show(ui, |ui| {
@@ -703,7 +703,7 @@ impl RustpixApp {
703703
ui.painter().rect_stroke(
704704
rect,
705705
CornerRadius::same(3),
706-
Stroke::new(1.0, colors.border_light),
706+
Stroke::new(1.0_f32, colors.border_light),
707707
StrokeKind::Inside,
708708
);
709709
ui.painter().rect_filled(rect, CornerRadius::same(3), fill);
@@ -730,7 +730,7 @@ impl RustpixApp {
730730
ui.painter().hline(
731731
header_rect.x_range(),
732732
header_rect.bottom(),
733-
Stroke::new(1.0, colors.border),
733+
Stroke::new(1.0_f32, colors.border),
734734
);
735735

736736
// Content
@@ -752,7 +752,7 @@ impl RustpixApp {
752752
ui.painter().hline(
753753
last_rect.x_range(),
754754
last_rect.bottom(),
755-
Stroke::new(1.0, colors.border),
755+
Stroke::new(1.0_f32, colors.border),
756756
);
757757
});
758758
}
@@ -870,7 +870,7 @@ impl RustpixApp {
870870
.add(
871871
egui::Button::new("⚙")
872872
.fill(Color32::TRANSPARENT)
873-
.stroke(Stroke::new(1.0, colors.border_light))
873+
.stroke(Stroke::new(1.0_f32, colors.border_light))
874874
.corner_radius(CornerRadius::same(4)),
875875
)
876876
.on_hover_text("Algorithm parameters")
@@ -886,7 +886,7 @@ impl RustpixApp {
886886
ui.add_space(8.0);
887887
egui::Frame::new()
888888
.fill(colors.bg_header)
889-
.stroke(Stroke::new(1.0, colors.border))
889+
.stroke(Stroke::new(1.0_f32, colors.border))
890890
.corner_radius(CornerRadius::same(4))
891891
.inner_margin(egui::Margin::same(12))
892892
.show(ui, |ui| {
@@ -1093,7 +1093,7 @@ impl RustpixApp {
10931093
ui.add(
10941094
egui::Button::new("?")
10951095
.fill(Color32::TRANSPARENT)
1096-
.stroke(Stroke::new(1.0, colors.border_light))
1096+
.stroke(Stroke::new(1.0_f32, colors.border_light))
10971097
.corner_radius(CornerRadius::same(4)),
10981098
)
10991099
.on_hover_text(

rustpix-gui/src/ui/main_view.rs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ impl RustpixApp {
475475
ui.painter().rect_stroke(
476476
rect,
477477
CornerRadius::same(4),
478-
Stroke::new(1.0, colors.border),
478+
Stroke::new(1.0_f32, colors.border),
479479
StrokeKind::Inside,
480480
);
481481

@@ -596,7 +596,7 @@ impl RustpixApp {
596596
)
597597
.min_size(egui::vec2(0.0, 28.0))
598598
.fill(Color32::TRANSPARENT)
599-
.stroke(Stroke::new(1.0, colors.border_light))
599+
.stroke(Stroke::new(1.0_f32, colors.border_light))
600600
.corner_radius(CornerRadius::same(4));
601601

602602
if ui
@@ -633,7 +633,7 @@ impl RustpixApp {
633633
} else {
634634
Color32::TRANSPARENT
635635
})
636-
.stroke(Stroke::new(1.0, colors.border_light))
636+
.stroke(Stroke::new(1.0_f32, colors.border_light))
637637
.corner_radius(CornerRadius::same(4));
638638

639639
if ui.add(grid_btn).on_hover_text("Toggle grid").clicked() {
@@ -707,7 +707,7 @@ impl RustpixApp {
707707
} else {
708708
Color32::TRANSPARENT
709709
})
710-
.stroke(Stroke::new(1.0, colors.border_light))
710+
.stroke(Stroke::new(1.0_f32, colors.border_light))
711711
.corner_radius(CornerRadius::same(4));
712712
ui.add(btn)
713713
}
@@ -815,7 +815,7 @@ impl RustpixApp {
815815
};
816816
egui::Frame::new()
817817
.fill(no_data_bg)
818-
.stroke(Stroke::new(1.0, colors.border))
818+
.stroke(Stroke::new(1.0_f32, colors.border))
819819
.corner_radius(CornerRadius::same(4))
820820
.show(ui, |ui| {
821821
ui.set_min_size(ui.available_size());
@@ -974,7 +974,7 @@ impl RustpixApp {
974974
};
975975
let hot_points = Points::new("hot_pixels", PlotPoints::new(hot_points))
976976
.shape(MarkerShape::Square)
977-
.radius(2.0)
977+
.radius(2.0_f32)
978978
.color(accent::RED)
979979
.allow_hover(false);
980980
plot_ui.points(hot_points);
@@ -1346,7 +1346,7 @@ impl RustpixApp {
13461346
painter.rect_stroke(
13471347
rect,
13481348
CornerRadius::same(2),
1349-
Stroke::new(1.0, Color32::from_rgb(58, 130, 246)),
1349+
Stroke::new(1.0_f32, Color32::from_rgb(58, 130, 246)),
13501350
StrokeKind::Inside,
13511351
);
13521352
}
@@ -1390,7 +1390,7 @@ impl RustpixApp {
13901390
painter.rect_stroke(
13911391
rect.1,
13921392
CornerRadius::ZERO,
1393-
Stroke::new(1.0, colors.border),
1393+
Stroke::new(1.0_f32, colors.border),
13941394
StrokeKind::Inside,
13951395
);
13961396

@@ -1407,7 +1407,7 @@ impl RustpixApp {
14071407
fn render_roi_toolbar(&mut self, ui: &mut egui::Ui) {
14081408
let colors = ThemeColors::from_ui(ui);
14091409
egui::Frame::new()
1410-
.stroke(Stroke::new(1.0, colors.border_light))
1410+
.stroke(Stroke::new(1.0_f32, colors.border_light))
14111411
.corner_radius(CornerRadius::same(4))
14121412
.inner_margin(egui::Margin::symmetric(4, 2))
14131413
.show(ui, |ui| {
@@ -1442,7 +1442,7 @@ impl RustpixApp {
14421442
let menu_button = egui::Button::new("")
14431443
.min_size(egui::vec2(34.0, 22.0))
14441444
.fill(Color32::TRANSPARENT)
1445-
.stroke(Stroke::new(1.0, colors.border_light))
1445+
.stroke(Stroke::new(1.0_f32, colors.border_light))
14461446
.corner_radius(CornerRadius::same(4));
14471447
let menu_response =
14481448
egui::containers::menu::MenuButton::from_button(menu_button).ui(ui, |ui| {
@@ -1505,7 +1505,7 @@ impl RustpixApp {
15051505
let gear_button = egui::Button::new("")
15061506
.min_size(egui::vec2(28.0, 22.0))
15071507
.fill(Color32::TRANSPARENT)
1508-
.stroke(Stroke::new(1.0, colors.border_light))
1508+
.stroke(Stroke::new(1.0_f32, colors.border_light))
15091509
.corner_radius(CornerRadius::same(4));
15101510
let gear_response =
15111511
egui::containers::menu::MenuButton::from_button(gear_button).ui(ui, |ui| {
@@ -1523,7 +1523,7 @@ impl RustpixApp {
15231523
let help_button = egui::Button::new("?")
15241524
.min_size(egui::vec2(24.0, 22.0))
15251525
.fill(Color32::TRANSPARENT)
1526-
.stroke(Stroke::new(1.0, colors.border_light))
1526+
.stroke(Stroke::new(1.0_f32, colors.border_light))
15271527
.corner_radius(CornerRadius::same(4));
15281528
let response = ui.add(help_button);
15291529
if response.clicked() {
@@ -1635,7 +1635,7 @@ impl RustpixApp {
16351635
let mut actions = SpectrumToolbarActions::default();
16361636
egui::Frame::new()
16371637
.fill(colors.bg_panel)
1638-
.stroke(Stroke::new(1.0, colors.border))
1638+
.stroke(Stroke::new(1.0_f32, colors.border))
16391639
.corner_radius(CornerRadius::same(4))
16401640
.inner_margin(egui::Margin::symmetric(12, 8))
16411641
.show(ui, |ui| {
@@ -1717,7 +1717,7 @@ impl RustpixApp {
17171717
.add(
17181718
egui::Button::new("⚙")
17191719
.fill(Color32::TRANSPARENT)
1720-
.stroke(Stroke::new(1.0, colors.border_light))
1720+
.stroke(Stroke::new(1.0_f32, colors.border_light))
17211721
.corner_radius(CornerRadius::same(4)),
17221722
)
17231723
.on_hover_text("Spectrum settings")
@@ -1736,7 +1736,7 @@ impl RustpixApp {
17361736
} else {
17371737
Color32::TRANSPARENT
17381738
})
1739-
.stroke(Stroke::new(1.0, colors.border_light))
1739+
.stroke(Stroke::new(1.0_f32, colors.border_light))
17401740
.corner_radius(CornerRadius::same(4));
17411741
let data_response = ui.add(data_button);
17421742
let data_icon = Self::roi_icon_image(RoiToolbarIcon::Data, colors.text_muted);
@@ -1759,7 +1759,7 @@ impl RustpixApp {
17591759
.color(colors.text_dim),
17601760
)
17611761
.fill(Color32::TRANSPARENT)
1762-
.stroke(Stroke::new(1.0, colors.border_light))
1762+
.stroke(Stroke::new(1.0_f32, colors.border_light))
17631763
.corner_radius(CornerRadius::same(4));
17641764
if ui.add(range_btn).clicked() {
17651765
let opening = !self.ui_state.panel_popups.show_spectrum_range;
@@ -1778,7 +1778,7 @@ impl RustpixApp {
17781778
} else {
17791779
Color32::TRANSPARENT
17801780
})
1781-
.stroke(Stroke::new(1.0, colors.border_light))
1781+
.stroke(Stroke::new(1.0_f32, colors.border_light))
17821782
.corner_radius(CornerRadius::same(4));
17831783
if ui.add(help_button).on_hover_text("Spectrum help").clicked() {
17841784
self.ui_state.panel_popups.show_spectrum_help =
@@ -1800,7 +1800,7 @@ impl RustpixApp {
18001800
.color(colors.text_dim),
18011801
)
18021802
.fill(Color32::TRANSPARENT)
1803-
.stroke(Stroke::new(1.0, colors.border_light))
1803+
.stroke(Stroke::new(1.0_f32, colors.border_light))
18041804
.corner_radius(CornerRadius::same(4));
18051805
if ui
18061806
.add_enabled(has_full_spectrum, png_btn)
@@ -1816,7 +1816,7 @@ impl RustpixApp {
18161816
.color(colors.text_dim),
18171817
)
18181818
.fill(Color32::TRANSPARENT)
1819-
.stroke(Stroke::new(1.0, colors.border_light))
1819+
.stroke(Stroke::new(1.0_f32, colors.border_light))
18201820
.corner_radius(CornerRadius::same(4));
18211821
if ui
18221822
.add_enabled(has_visible_spectrum, csv_btn)
@@ -1844,7 +1844,7 @@ impl RustpixApp {
18441844
.color(colors.text_muted),
18451845
)
18461846
.fill(Color32::TRANSPARENT)
1847-
.stroke(Stroke::new(1.0, colors.border_light))
1847+
.stroke(Stroke::new(1.0_f32, colors.border_light))
18481848
.corner_radius(CornerRadius::same(4)),
18491849
)
18501850
.on_hover_text("Reset spectrum view (or double-click)")
@@ -1887,7 +1887,7 @@ impl RustpixApp {
18871887
};
18881888
let button = egui::Button::new(egui::RichText::new(label).size(10.0).color(text_color))
18891889
.fill(fill)
1890-
.stroke(Stroke::new(1.0, colors.border_light))
1890+
.stroke(Stroke::new(1.0_f32, colors.border_light))
18911891
.corner_radius(CornerRadius::same(4));
18921892
ui.add(button).clicked()
18931893
}
@@ -2287,7 +2287,7 @@ impl RustpixApp {
22872287
plot_ui.vline(
22882288
VLine::new(format!("Slice {}", inputs.current_tof_bin + 1), slice_x)
22892289
.color(accent::RED)
2290-
.width(1.0)
2290+
.width(1.0_f32)
22912291
.style(egui_plot::LineStyle::Dashed { length: 4.0 }),
22922292
);
22932293
}
@@ -2391,7 +2391,7 @@ impl RustpixApp {
23912391
};
23922392
egui::Frame::new()
23932393
.fill(no_data_bg)
2394-
.stroke(Stroke::new(1.0, colors.border))
2394+
.stroke(Stroke::new(1.0_f32, colors.border))
23952395
.corner_radius(CornerRadius::same(4))
23962396
.inner_margin(egui::Margin::same(16))
23972397
.show(ui, |ui| {
@@ -2743,7 +2743,7 @@ impl RustpixApp {
27432743
let colors = ThemeColors::from_ui(ui);
27442744
egui::Frame::new()
27452745
.fill(colors.bg_panel)
2746-
.stroke(Stroke::new(1.0, colors.border))
2746+
.stroke(Stroke::new(1.0_f32, colors.border))
27472747
.corner_radius(CornerRadius::same(4))
27482748
.inner_margin(egui::Margin::symmetric(10, 6))
27492749
.show(ui, |ui| {
@@ -2832,7 +2832,7 @@ impl RustpixApp {
28322832
} else {
28332833
Color32::TRANSPARENT
28342834
})
2835-
.stroke(Stroke::new(1.0, colors.border_light))
2835+
.stroke(Stroke::new(1.0_f32, colors.border_light))
28362836
.corner_radius(CornerRadius::same(4));
28372837
let response = ui.add(button);
28382838
let image = Self::zoom_icon_image(icon, tint);
@@ -2858,7 +2858,7 @@ impl RustpixApp {
28582858
ui.painter().vline(
28592859
rect.1.center().x,
28602860
rect.1.y_range(),
2861-
Stroke::new(1.0, colors.border),
2861+
Stroke::new(1.0_f32, colors.border),
28622862
);
28632863
}
28642864

@@ -2877,7 +2877,7 @@ impl RustpixApp {
28772877
let button = egui::Button::new("")
28782878
.min_size(egui::vec2(28.0, 22.0))
28792879
.fill(Color32::TRANSPARENT)
2880-
.stroke(Stroke::new(1.0, colors.border_light))
2880+
.stroke(Stroke::new(1.0_f32, colors.border_light))
28812881
.corner_radius(CornerRadius::same(4));
28822882
let response = ui.add(button);
28832883
let image = Self::roi_icon_image(icon, colors.text_muted);

rustpix-gui/src/ui/statistics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl RustpixApp {
6060
ui.painter().hline(
6161
ui.available_rect_before_wrap().x_range(),
6262
ui.cursor().top(),
63-
Stroke::new(1.0, colors.border),
63+
Stroke::new(1.0_f32, colors.border),
6464
);
6565
});
6666
ui.add_space(8.0);

0 commit comments

Comments
 (0)