Wrap Screenshot::bytes in an Arc and implement AsRef<[u8]>

This commit is contained in:
Héctor Ramón Jiménez 2023-06-06 16:14:42 +02:00
parent 7adfaa88a6
commit 5324928044
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
2 changed files with 16 additions and 5 deletions

View file

@ -133,7 +133,7 @@ impl Application for Example {
image(image::Handle::from_pixels(
screenshot.size.width,
screenshot.size.height,
screenshot.bytes.clone(),
screenshot.clone(),
))
.content_fit(ContentFit::ScaleDown)
.width(Length::Fill)