diff --git a/src/bin/wprsd.rs b/src/bin/wprsd.rs index 68e16fb5..b3eb28da 100644 --- a/src/bin/wprsd.rs +++ b/src/bin/wprsd.rs @@ -215,7 +215,7 @@ fn start_xwayland_xdg_shell( xwayland_xdg_shell_wayland_debug: bool, xwayland_xdg_shell_args: &[String], ) { - Command::new(xwayland_xdg_shell_path) + let mut child = Command::new(xwayland_xdg_shell_path) .env("WAYLAND_DISPLAY", wayland_display) .env( "WAYLAND_DEBUG", @@ -227,7 +227,11 @@ fn start_xwayland_xdg_shell( ) .args(xwayland_xdg_shell_args) .spawn() - .expect("error starting xwayland-xdg-shell"); + .expect("failed executing xwayland-xdg-shell"); + + std::thread::spawn(move || { + child.wait().expect("failed waiting xwayland-xdg-shell"); + }); } #[allow(clippy::missing_panics_doc)] diff --git a/src/buffer_pointer.rs b/src/buffer_pointer.rs index 8b79fb0c..e6094123 100644 --- a/src/buffer_pointer.rs +++ b/src/buffer_pointer.rs @@ -248,7 +248,7 @@ impl<'a, T: 'a> Iterator for Chunks<'a, T> { } } -impl<'a, T: 'a> ExactSizeIterator for Chunks<'_, T> {} +impl ExactSizeIterator for Chunks<'_, T> {} #[cfg(test)] mod tests { diff --git a/src/channel_utils.rs b/src/channel_utils.rs index 8a4b0653..6c26637c 100644 --- a/src/channel_utils.rs +++ b/src/channel_utils.rs @@ -102,6 +102,7 @@ impl Sender for DiscardingSender { } /// A sender whose channnel is promised (as opposed to guaranteed) to be open. +/// /// Useful when the lifetime of the sender and receiver (including clones /// thereof) are known to be the same according to program logic but that can't /// be proven with lifetimes due to the endpoints being cloned. diff --git a/src/prefix_sum.rs b/src/prefix_sum.rs index 6aa59997..6e94038d 100644 --- a/src/prefix_sum.rs +++ b/src/prefix_sum.rs @@ -115,9 +115,11 @@ pub fn prefix_sum_scalar(a: &mut [u8], prior_sum: u8) { } } -/// Computes the prefix sum of `arr` in-place. BS bytes will be processed at a -/// time; small sizes will cause pipeline stalls and large sizes will cause -/// cache misses. `BS` must be non-zero and a multiple of 32. +/// Computes the prefix sum of `arr` in-place. +/// +/// BS bytes will be processed at a time; small sizes will cause pipeline +/// stalls and large sizes will cause cache misses. `BS` must be non-zero +/// and a multiple of 32. /// /// # Safety /// * avx2 and sse2 must be available. diff --git a/src/xwayland_xdg_shell/client.rs b/src/xwayland_xdg_shell/client.rs index 225e5d18..1efb888e 100644 --- a/src/xwayland_xdg_shell/client.rs +++ b/src/xwayland_xdg_shell/client.rs @@ -993,11 +993,8 @@ impl XWaylandBuffer { impl XWaylandSurface { pub fn write_data(&mut self, data: BufferPointer, pool: &mut SlotPool) -> Result<()> { - match &mut self.buffer { - Some(buffer) => { - buffer.write_data(data, pool).location(loc!())?; - }, - None => {}, + if let Some(buffer) = &mut self.buffer { + buffer.write_data(data, pool).location(loc!())?; } Ok(()) }