Skip to content

Commit

Permalink
tidying up dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sminez committed Jun 9, 2024
1 parent 000a305 commit 6b242e6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 36 deletions.
21 changes: 9 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ include = [
"Cargo.toml",
"README.md"
]
keywords = [ "windowmanager", "window", "manager", "x11" ]
categories = [ "window manager" ]
keywords = [ "wm", "windowmanager", "window", "manager", "x11" ]

[workspace]
members = [
Expand All @@ -30,20 +29,18 @@ x11rb-xcb = ["x11rb", "x11rb/allow-unsafe-code"]
[dependencies]
anymap = "0.12"
bitflags = { version = "2.5", features = ["serde"] }
nix = { version = "0.26", default-features = false, features = ["signal"] }
nix = { version = "0.29", default-features = false, features = ["signal"] }
penrose_keysyms = { version = "0.3.4", path = "crates/penrose_keysyms", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
strum = { version = "0.25", features = ["derive"] }
strum_macros = "0.25"
strum = { version = "0.26", features = ["derive"] }
thiserror = "1.0"
tracing = { version = "0.1", features = ["attributes"] }
x11rb = { version = "0.12", features = ["randr"], optional = true }
x11rb = { version = "0.13", features = ["randr"], optional = true }

[dev-dependencies]
paste = "1.0.15"
penrose_ui = { path = "crates/penrose_ui" }
serde_json = "1.0.117"
simple_test_case = "1.2.0"
quickcheck = "1.0.3"
quickcheck_macros = "1.0.0"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
serde_json = "1"
simple_test_case = "1"
quickcheck = "1"
quickcheck_macros = "1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
3 changes: 1 addition & 2 deletions crates/penrose_keysyms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ keywords = [ "windowmanager", "window", "manager", "x11", "keysym" ]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
strum = { version = "0.25.0", features = ["derive"] }
strum_macros = "0.25.3"
strum = { version = "0.26", features = ["derive"] }
4 changes: 2 additions & 2 deletions crates/penrose_ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ description = "UI elements for the penrose window manager library"
penrose = { version = "0.3.5", path = "../../" }
tracing = { version = "0.1", features = ["attributes"] }
thiserror = "1.0"
yeslogic-fontconfig-sys = "4.0"
yeslogic-fontconfig-sys = "5.0"
x11 = { version = "2.21", features = ["xft", "xlib"] }

[dev-dependencies]
anyhow = "1.0.86"
anyhow = "1"
40 changes: 20 additions & 20 deletions src/pure/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,33 +1007,33 @@ mod quickcheck_tests {
rotate_down == reverse . rotate_up . reverse
);

// Two methods that should act as both left and right inverses of one another
macro_rules! are_inverse {
($test:ident => $a:ident <> $b:ident) => {
paste::paste! {
mod inverses {
use super::*;

// Two methods that should act as left and right inverses of one another
macro_rules! are_inverse {
($test:ident => $a:ident <> $b:ident) => {
#[quickcheck]
fn [<inverse _ $test _ left_right>](mut stack: Stack<u8>) -> bool {
fn $test(mut stack: Stack<u8>) -> bool {
let original = stack.clone();
stack.$a().$b();

stack == original
}
};
}

#[quickcheck]
fn [<inverse _ $test _ right_left>](mut stack: Stack<u8>) -> bool {
let original = stack.clone();
stack.$b().$a();
// Self inverses
are_inverse!(reverse => reverse <> reverse);
are_inverse!(rev_up => rev_up <> rev_up);
are_inverse!(rev_down => rev_down <> rev_down);

stack == original
}
}
};
// Inverse pairs
are_inverse!(focus_up_down => focus_up <> focus_down);
are_inverse!(focus_down_up => focus_down <> focus_up);
are_inverse!(swap_up_down => swap_up <> swap_down);
are_inverse!(swap_down_up => swap_down <> swap_up);
are_inverse!(rotate_up_down => rotate_up <> rotate_down);
are_inverse!(rotate_down_up => rotate_down <> rotate_up);
}

are_inverse!(reverse => reverse <> reverse);
are_inverse!(rev_up => rev_up <> rev_up);
are_inverse!(rev_down => rev_down <> rev_down);
are_inverse!(focus => focus_up <> focus_down);
are_inverse!(swap => swap_up <> swap_down);
are_inverse!(rotate => rotate_up <> rotate_down);
}

0 comments on commit 6b242e6

Please sign in to comment.