Remove itertools

This commit is contained in:
Ottatop 2023-09-10 22:53:24 -05:00
parent d738a7a475
commit dd5992ed98
2 changed files with 12 additions and 10 deletions

View file

@ -25,13 +25,13 @@ rmp-serde = { version = "1.1.2" }
calloop = { version = "0.10.1", features = ["executor", "futures-io"] }
futures-lite = { version = "1.13.0" }
async-process = { version = "1.7.0" }
itertools = { version = "0.11.0" }
x11rb = { version = "0.12.0", default-features = false, features = ["composite"], optional = true }
shellexpand = "3.1.0"
toml = "0.7.7"
anyhow = { version = "1.0.75", features = ["backtrace"] }
clap = { version = "4.4.2", features = ["derive"] }
xkbcommon = "0.6.0"
xdg = "2.5.2"
[features]
default = ["egl", "winit", "udev", "xwayland"]

View file

@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
use itertools::{Either, Itertools};
use smithay::{
desktop::layer_map_for_output,
output::Output,
@ -401,14 +400,17 @@ fn corner(layout: &Layout, windows: Vec<WindowElement>, rect: Rectangle<i32, Log
_ => {
let mut windows = windows.into_iter();
let Some(corner) = windows.next() else { unreachable!() };
let (horiz_stack, vert_stack): (Vec<WindowElement>, Vec<WindowElement>) =
windows.enumerate().partition_map(|(i, win)| {
if i % 2 == 0 {
Either::Left(win)
} else {
Either::Right(win)
}
});
let mut horiz_stack = Vec::<WindowElement>::new();
let mut vert_stack = Vec::<WindowElement>::new();
for (i, win) in windows.enumerate() {
if i % 2 == 0 {
horiz_stack.push(win);
} else {
vert_stack.push(win);
}
}
let div_factor = 2;