Implement From<Option<T>> for Element

This commit is contained in:
Héctor Ramón Jiménez 2025-07-18 03:53:59 +02:00
parent dcea10f707
commit e0d9078334
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
9 changed files with 110 additions and 74 deletions

View file

@ -158,15 +158,15 @@ impl Example {
.spacing(10)
.align_y(Center);
let crop_controls =
column![crop_origin_controls, crop_dimension_controls]
.push_maybe(
self.crop_error
.as_ref()
.map(|error| text!("Crop error! \n{error}")),
)
.spacing(10)
.align_x(Center);
let crop_controls = column![
crop_origin_controls,
crop_dimension_controls,
self.crop_error
.as_ref()
.map(|error| text!("Crop error! \n{error}")),
]
.spacing(10)
.align_x(Center);
let controls = {
let save_result =
@ -208,8 +208,8 @@ impl Example {
]
.spacing(10)
.align_x(Center),
save_result.map(text)
]
.push_maybe(save_result.map(text))
.spacing(40)
};