diff --git a/window/src/os/x11/window.rs b/window/src/os/x11/window.rs index 7c0c0516658b..e4264e63ad81 100644 --- a/window/src/os/x11/window.rs +++ b/window/src/os/x11/window.rs @@ -972,13 +972,13 @@ impl XWindow { Some(c) => c.clone(), None => config::configuration(), }; - let conn = Connection::get() + let connection = Connection::get() .ok_or_else(|| { anyhow!( "new_window must be called on the gui thread after Connection::init has succeeded", ) - })? - .x11(); + })?; + let conn = connection.x11(); let ResolvedGeometry { x, @@ -1044,7 +1044,7 @@ impl XWindow { events.assign_window(Window::X11(XWindow::from_id(window_id))); - let appearance = conn.get_appearance(); + let appearance = connection.get_appearance(); Arc::new(Mutex::new(XWindowInner { title: String::new(),