mirror of
https://github.com/zellij-org/zellij.git
synced 2024-12-23 17:22:28 +03:00
chore(rust): move to 2021 edition
Get with the times, kiddo (and all hail disjoint captures)
This commit is contained in:
parent
a9fdaaa8d1
commit
e0d7212c2a
@ -2,7 +2,7 @@
|
||||
name = "zellij"
|
||||
version = "0.20.0"
|
||||
authors = ["Aram Drevekenin <aram@poor.dev>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
description = "A terminal workspace with batteries included"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/zellij-org/zellij"
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "status-bar"
|
||||
version = "0.1.0"
|
||||
authors = ["Brooks J Rady <b.j.rady@gmail.com>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
|
||||
[dependencies]
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "strider"
|
||||
version = "0.2.0"
|
||||
authors = ["Brooks J Rady <b.j.rady@gmail.com>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
description = "A simplified ranger clone written as a Zellij plugin"
|
||||
license = "MIT"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "tab-bar"
|
||||
version = "0.1.0"
|
||||
authors = ["Jonah Caplan <jonahcaplan@gmail.com>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
|
||||
[dependencies]
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "zellij-client"
|
||||
version = "0.20.0"
|
||||
authors = ["Kunal Mohan <kunalmohan99@gmail.com>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
description = "The client-side library for Zellij"
|
||||
license = "MIT"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "zellij-server"
|
||||
version = "0.20.0"
|
||||
authors = ["Kunal Mohan <kunalmohan99@gmail.com>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
description = "The server-side library for Zellij"
|
||||
license = "MIT"
|
||||
|
||||
|
@ -1515,7 +1515,6 @@ impl Perform for Grid {
|
||||
}
|
||||
dynamic_code += 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -225,101 +225,90 @@ impl CharacterStyles {
|
||||
if self.foreground != new_styles.foreground {
|
||||
if let Some(new_diff) = diff.as_mut() {
|
||||
diff = Some(new_diff.foreground(new_styles.foreground));
|
||||
self.foreground = new_styles.foreground;
|
||||
} else {
|
||||
diff = Some(CharacterStyles::new().foreground(new_styles.foreground));
|
||||
self.foreground = new_styles.foreground;
|
||||
}
|
||||
self.foreground = new_styles.foreground;
|
||||
}
|
||||
if self.background != new_styles.background {
|
||||
if let Some(new_diff) = diff.as_mut() {
|
||||
diff = Some(new_diff.background(new_styles.background));
|
||||
self.background = new_styles.background;
|
||||
} else {
|
||||
diff = Some(CharacterStyles::new().background(new_styles.background));
|
||||
self.background = new_styles.background;
|
||||
}
|
||||
self.background = new_styles.background;
|
||||
}
|
||||
if self.strike != new_styles.strike {
|
||||
if let Some(new_diff) = diff.as_mut() {
|
||||
diff = Some(new_diff.strike(new_styles.strike));
|
||||
self.strike = new_styles.strike;
|
||||
} else {
|
||||
diff = Some(CharacterStyles::new().strike(new_styles.strike));
|
||||
self.strike = new_styles.strike;
|
||||
}
|
||||
self.strike = new_styles.strike;
|
||||
}
|
||||
if self.hidden != new_styles.hidden {
|
||||
if let Some(new_diff) = diff.as_mut() {
|
||||
diff = Some(new_diff.hidden(new_styles.hidden));
|
||||
self.hidden = new_styles.hidden;
|
||||
} else {
|
||||
diff = Some(CharacterStyles::new().hidden(new_styles.hidden));
|
||||
self.hidden = new_styles.hidden;
|
||||
}
|
||||
self.hidden = new_styles.hidden;
|
||||
}
|
||||
if self.reverse != new_styles.reverse {
|
||||
if let Some(new_diff) = diff.as_mut() {
|
||||
diff = Some(new_diff.reverse(new_styles.reverse));
|
||||
self.reverse = new_styles.reverse;
|
||||
} else {
|
||||
diff = Some(CharacterStyles::new().reverse(new_styles.reverse));
|
||||
self.reverse = new_styles.reverse;
|
||||
}
|
||||
self.reverse = new_styles.reverse;
|
||||
}
|
||||
if self.slow_blink != new_styles.slow_blink {
|
||||
if let Some(new_diff) = diff.as_mut() {
|
||||
diff = Some(new_diff.blink_slow(new_styles.slow_blink));
|
||||
self.slow_blink = new_styles.slow_blink;
|
||||
} else {
|
||||
diff = Some(CharacterStyles::new().blink_slow(new_styles.slow_blink));
|
||||
self.slow_blink = new_styles.slow_blink;
|
||||
}
|
||||
self.slow_blink = new_styles.slow_blink;
|
||||
}
|
||||
if self.fast_blink != new_styles.fast_blink {
|
||||
if let Some(new_diff) = diff.as_mut() {
|
||||
diff = Some(new_diff.blink_fast(new_styles.fast_blink));
|
||||
self.fast_blink = new_styles.fast_blink;
|
||||
} else {
|
||||
diff = Some(CharacterStyles::new().blink_fast(new_styles.fast_blink));
|
||||
self.fast_blink = new_styles.fast_blink;
|
||||
}
|
||||
self.fast_blink = new_styles.fast_blink;
|
||||
}
|
||||
if self.underline != new_styles.underline {
|
||||
if let Some(new_diff) = diff.as_mut() {
|
||||
diff = Some(new_diff.underline(new_styles.underline));
|
||||
self.underline = new_styles.underline;
|
||||
} else {
|
||||
diff = Some(CharacterStyles::new().underline(new_styles.underline));
|
||||
self.underline = new_styles.underline;
|
||||
}
|
||||
self.underline = new_styles.underline;
|
||||
}
|
||||
if self.bold != new_styles.bold {
|
||||
if let Some(new_diff) = diff.as_mut() {
|
||||
diff = Some(new_diff.bold(new_styles.bold));
|
||||
self.bold = new_styles.bold;
|
||||
} else {
|
||||
diff = Some(CharacterStyles::new().bold(new_styles.bold));
|
||||
self.bold = new_styles.bold;
|
||||
}
|
||||
self.bold = new_styles.bold;
|
||||
}
|
||||
if self.dim != new_styles.dim {
|
||||
if let Some(new_diff) = diff.as_mut() {
|
||||
diff = Some(new_diff.dim(new_styles.dim));
|
||||
self.dim = new_styles.dim;
|
||||
} else {
|
||||
diff = Some(CharacterStyles::new().dim(new_styles.dim));
|
||||
self.dim = new_styles.dim;
|
||||
}
|
||||
self.dim = new_styles.dim;
|
||||
}
|
||||
if self.italic != new_styles.italic {
|
||||
if let Some(new_diff) = diff.as_mut() {
|
||||
diff = Some(new_diff.italic(new_styles.italic));
|
||||
self.italic = new_styles.italic;
|
||||
} else {
|
||||
diff = Some(CharacterStyles::new().italic(new_styles.italic));
|
||||
self.italic = new_styles.italic;
|
||||
}
|
||||
self.italic = new_styles.italic;
|
||||
}
|
||||
|
||||
if let Some(changed_colors) = changed_colors {
|
||||
|
@ -1738,14 +1738,10 @@ impl Tab {
|
||||
self.set_pane_frames(self.draw_pane_frames);
|
||||
}
|
||||
pub fn resize_whole_tab(&mut self, new_screen_size: Size) {
|
||||
// FIXME: I *think* that Rust 2021 will let me just write this:
|
||||
// let panes = self.panes.iter_mut().filter(|(pid, _)| !self.panes_to_hide.contains(pid));
|
||||
// In the meantime, let's appease our borrow-checker overlords:
|
||||
let temp_panes_to_hide = &self.panes_to_hide;
|
||||
let panes = self
|
||||
.panes
|
||||
.iter_mut()
|
||||
.filter(|(pid, _)| !temp_panes_to_hide.contains(pid));
|
||||
.filter(|(pid, _)| !self.panes_to_hide.contains(pid));
|
||||
let Size { rows, cols } = new_screen_size;
|
||||
let mut resizer = PaneResizer::new(panes);
|
||||
if resizer.layout(Direction::Horizontal, cols).is_ok() {
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "zellij-tile-utils"
|
||||
version = "0.20.0"
|
||||
authors = ["denis <denismaximov98@gmail.com>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
description = "A utility library for Zellij plugins"
|
||||
license = "MIT"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "zellij-tile"
|
||||
version = "0.20.0"
|
||||
authors = ["Brooks J Rady <b.j.rady@gmail.com>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
description = "A small client-side library for writing Zellij plugins"
|
||||
license = "MIT"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "zellij-utils"
|
||||
version = "0.20.0"
|
||||
authors = ["Kunal Mohan <kunalmohan99@gmail.com>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
description = "A utility library for Zellij client and server"
|
||||
license = "MIT"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user