build: update ratatui to v0.28 (#41)
This commit is contained in:
+2
-2
@@ -23,12 +23,12 @@ debug = true
|
|||||||
lto = true
|
lto = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ratatui = { version = "0.27", default-features = false }
|
ratatui = { version = "0.28", default-features = false }
|
||||||
unicode-width = "0.1"
|
unicode-width = "0.1"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
criterion = "0.5"
|
criterion = "0.5"
|
||||||
ratatui = "0.27"
|
ratatui = "0.28"
|
||||||
|
|
||||||
[target.'cfg(target_family = "unix")'.dev-dependencies]
|
[target.'cfg(target_family = "unix")'.dev-dependencies]
|
||||||
pprof = { version = "0.13", features = ["criterion", "flamegraph"] }
|
pprof = { version = "0.13", features = ["criterion", "flamegraph"] }
|
||||||
|
|||||||
+2
-2
@@ -81,7 +81,7 @@ impl App {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn draw(&mut self, frame: &mut Frame) {
|
fn draw(&mut self, frame: &mut Frame) {
|
||||||
let area = frame.size();
|
let area = frame.area();
|
||||||
let widget = Tree::new(&self.items)
|
let widget = Tree::new(&self.items)
|
||||||
.expect("all item identifiers are unique")
|
.expect("all item identifiers are unique")
|
||||||
.block(
|
.block(
|
||||||
@@ -198,7 +198,7 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> std::io::Res
|
|||||||
let area = Rect {
|
let area = Rect {
|
||||||
y: 0,
|
y: 0,
|
||||||
height: 1,
|
height: 1,
|
||||||
x: frame.size().width.saturating_sub(text.len() as u16),
|
x: frame.area().width.saturating_sub(text.len() as u16),
|
||||||
width: text.len() as u16,
|
width: text.len() as u16,
|
||||||
};
|
};
|
||||||
frame.render_widget(
|
frame.render_widget(
|
||||||
|
|||||||
Reference in New Issue
Block a user