summaryrefslogtreecommitdiffstats
path: root/examples/screenshot
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-05 00:51:51 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-05 00:51:51 +0100
commite14e8e2e9acc7fb8debb7881d8891be5c3a13bd0 (patch)
tree691e7d930829890b84423f592a4405742a7766d8 /examples/screenshot
parent8792fc0bb731e71b4552a90449f3c38a858b50b1 (diff)
downloadiced-e14e8e2e9acc7fb8debb7881d8891be5c3a13bd0.tar.gz
iced-e14e8e2e9acc7fb8debb7881d8891be5c3a13bd0.tar.bz2
iced-e14e8e2e9acc7fb8debb7881d8891be5c3a13bd0.zip
Fix new `beta` toolchain warnings
Diffstat (limited to 'examples/screenshot')
-rw-r--r--examples/screenshot/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/screenshot/src/main.rs b/examples/screenshot/src/main.rs
index c5fe3004..64aa1a7a 100644
--- a/examples/screenshot/src/main.rs
+++ b/examples/screenshot/src/main.rs
@@ -228,8 +228,8 @@ impl Application for Example {
if let Some(png_result) = &self.saved_png_path {
let msg = match png_result {
Ok(path) => format!("Png saved as: {path:?}!"),
- Err(msg) => {
- format!("Png could not be saved due to:\n{msg:?}")
+ Err(PngError(error)) => {
+ format!("Png could not be saved due to:\n{}", error)
}
};
@@ -283,7 +283,7 @@ async fn save_to_png(screenshot: Screenshot) -> Result<String, PngError> {
ColorType::Rgba8,
)
.map(|_| path)
- .map_err(|err| PngError(format!("{err:?}")))
+ .map_err(|error| PngError(error.to_string()))
})
.await
.expect("Blocking task to finish")