Skip to content

Commit

Permalink
fixing clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
sminez committed Mar 3, 2025
1 parent d4084a6 commit 1bb88cf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/penrose_ui/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ pub struct Context<'a> {
colors: &'a mut HashMap<Color, XColor>,
}

impl<'a> Context<'a> {
impl Context<'_> {
/// Clear the underlying surface, restoring it to the background color.
pub fn clear(&mut self) -> Result<()> {
self.fill_rect(Rect::new(0, 0, self.s.r.w, self.s.r.h), self.bg)
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/actions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub fn set_fullscreen_state<X: XConn>(
let r = state
.client_set
.screen_for_client(&id)
.ok_or_else(|| Error::UnknownClient(id))?
.ok_or(Error::UnknownClient(id))?
.r;
state.client_set.float(id, r)?;
wstate.push(*full_screen);
Expand Down
6 changes: 1 addition & 5 deletions src/pure/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ impl<T> Stack<T> {
I: IntoIterator<Item = T>,
{
let mut it = iter.into_iter();

let focus = match it.next() {
Some(t) => t,
None => return None,
};
let focus = it.next()?;

Some(Self {
up: VecDeque::default(),
Expand Down
1 change: 1 addition & 0 deletions src/pure/stack_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,7 @@ pub mod tests {
}

#[cfg(test)]
#[allow(missing_docs)]
mod quickcheck_tests {
use super::{tests::test_stack_set_with_stacks, *};
use quickcheck::{Arbitrary, Gen};
Expand Down
2 changes: 1 addition & 1 deletion src/x/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::{
///
/// Any implementation of `MockXConn` will automatically implement `XConn` by forwarding on
/// calls to `$method` to `mock_$method`.
#[allow(unused_variables)]
#[allow(unused_variables, missing_docs)]
pub trait MockXConn {
fn mock_root(&self) -> Xid {
Xid(0)
Expand Down

0 comments on commit 1bb88cf

Please # to comment.