Skip to content

Commit

Permalink
apply cranky fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhbooth committed Oct 11, 2024
1 parent b7685ed commit a55e870
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
8 changes: 6 additions & 2 deletions src/bin/wprsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/buffer_pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ impl<'a, T: 'a> Iterator for Chunks<'a, T> {
}
}

impl<'a, T: 'a> ExactSizeIterator for Chunks<'_, T> {}
impl<T> ExactSizeIterator for Chunks<'_, T> {}

#[cfg(test)]
mod tests {
Expand Down
1 change: 1 addition & 0 deletions src/channel_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ impl<S: Sender> Sender for DiscardingSender<S> {
}

/// 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.
Expand Down
8 changes: 5 additions & 3 deletions src/prefix_sum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 2 additions & 5 deletions src/xwayland_xdg_shell/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -993,11 +993,8 @@ impl XWaylandBuffer {

impl XWaylandSurface {
pub fn write_data(&mut self, data: BufferPointer<u8>, 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(())
}
Expand Down

0 comments on commit a55e870

Please sign in to comment.