mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 14:28:11 +08:00
Fix a lot of Clippy warnings (#1808)
* fix a lot of clippy warnings * fix more clippy warnings * fix yet more clippy warnings * bump msrv to 1.70.0 to silence warnings * fix a lot of clippy warnings * fix more clippy warnings * fix yet more clippy warnings * fix a few more warnings * fix a clippy warning * remove a commented out line * silense too many arguments error * fix more clippy warnings * prefix underscore to unused vars/functions to fix warnings * use filter instead of map * move raw-rs-tests feature flat to module level to fix unused imports warnings * fix a couple of unused result warnings --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
f7ada701e5
commit
62f73df048
@@ -28,15 +28,11 @@ impl LayoutHolder for DemoArtworkDialog {
|
||||
fn layout(&self) -> Layout {
|
||||
let mut rows_of_images_with_buttons: Vec<_> = ARTWORK
|
||||
.chunks(3)
|
||||
.into_iter()
|
||||
.map(|chunk| {
|
||||
let images = chunk
|
||||
.into_iter()
|
||||
.map(|(_, thumbnail, _)| ImageLabel::new(*thumbnail).width(Some("256px".into())).widget_holder())
|
||||
.collect();
|
||||
.flat_map(|chunk| {
|
||||
let images = chunk.iter().map(|(_, thumbnail, _)| ImageLabel::new(*thumbnail).width(Some("256px".into())).widget_holder()).collect();
|
||||
|
||||
let buttons = chunk
|
||||
.into_iter()
|
||||
.iter()
|
||||
.map(|(name, _, filename)| {
|
||||
TextButton::new(*name)
|
||||
.min_width(256)
|
||||
@@ -56,7 +52,6 @@ impl LayoutHolder for DemoArtworkDialog {
|
||||
|
||||
vec![LayoutGroup::Row { widgets: images }, LayoutGroup::Row { widgets: buttons }, LayoutGroup::Row { widgets: vec![] }]
|
||||
})
|
||||
.flatten()
|
||||
.collect();
|
||||
let _ = rows_of_images_with_buttons.pop();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user