From 8d685a77c2b74181493009968e08087f4b993c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 11 Feb 2021 18:13:03 +0200 Subject: [PATCH] examples/glupload: Get rid of unnecessary Result-wrapping --- examples/src/bin/glupload.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/src/bin/glupload.rs b/examples/src/bin/glupload.rs index 42f740841..fdf44eca4 100644 --- a/examples/src/bin/glupload.rs +++ b/examples/src/bin/glupload.rs @@ -676,20 +676,16 @@ fn main_loop(mut app: App) -> Result, -) -> Result<(), Error> { +fn cleanup(_windowed_context: glutin::WindowedContext) { // To ensure that the context stays alive longer than the pipeline or any reference // inside GStreamer to the GL context, its display or anything else. See // https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/196 // // We might do any window/GL specific cleanup here as needed. - - Ok(()) } fn example_main() { - match App::new().and_then(main_loop).and_then(cleanup) { + match App::new().and_then(main_loop).map(cleanup) { Ok(r) => r, Err(e) => eprintln!("Error! {}", e), }