From b1088a6d11634dd062ebb90671a1a5296d8d9f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 18 May 2021 12:16:59 +0300 Subject: [PATCH] tutorials/basic-tutorial-13: Make sure that acquiring the main context actually succeeds --- tutorials/src/bin/basic-tutorial-13.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/src/bin/basic-tutorial-13.rs b/tutorials/src/bin/basic-tutorial-13.rs index aadcfccee..0c14d5ea1 100644 --- a/tutorials/src/bin/basic-tutorial-13.rs +++ b/tutorials/src/bin/basic-tutorial-13.rs @@ -119,7 +119,7 @@ USAGE: Choose one of the following options, then press enter: let main_context = glib::MainContext::default(); // ... and make it the main context by default so that we can then have a channel to send the // commands we received from the terminal. - let _guard = main_context.acquire(); + let _guard = main_context.acquire().unwrap(); // Build the channel to get the terminal inputs from a different thread. let (ready_tx, ready_rx) = glib::MainContext::channel(glib::PRIORITY_DEFAULT);