Skip to content

Commit

Permalink
build: update to ratatui 0.26
Browse files Browse the repository at this point in the history
  • Loading branch information
EdJoPaTo committed Feb 3, 2024
1 parent 969b78a commit 4cbe932
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ include = ["src/**/*", "README.md"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ratatui = { version = "0.25", default-features = false }
ratatui = { version = "0.26", default-features = false }
unicode-width = "0.1"

[dev-dependencies]
crossterm = "0.27"
ratatui = "0.25"
ratatui = "0.26"
8 changes: 2 additions & 6 deletions examples/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crossterm::{
use ratatui::{
backend::{Backend, CrosstermBackend},
style::{Color, Modifier, Style},
widgets::{Block, Borders},
widgets::Block,
Terminal,
};
use std::error::Error;
Expand Down Expand Up @@ -85,11 +85,7 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> io::Result<(

let items = Tree::new(app.tree.items.clone())
.expect("all item identifiers are unique")
.block(
Block::new()
.borders(Borders::ALL)
.title(format!("Tree Widget {:?}", app.tree.state)),
)
.block(Block::bordered().title(format!("Tree Widget {:?}", app.tree.state)))
.highlight_style(
Style::new()
.fg(Color::Black)
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ fn tree_item_add_child_errors_with_duplicate_identifiers() {
/// # use tui_tree_widget::{Tree, TreeItem, TreeState};
/// # use ratatui::backend::TestBackend;
/// # use ratatui::Terminal;
/// # use ratatui::widgets::{Block, Borders};
/// # use ratatui::widgets::Block;
/// # let mut terminal = Terminal::new(TestBackend::new(32, 32)).unwrap();
/// let mut state = TreeState::default();
///
Expand All @@ -426,7 +426,7 @@ fn tree_item_add_child_errors_with_duplicate_identifiers() {
///
/// let tree_widget = Tree::new(items)
/// .expect("all item identifiers are unique")
/// .block(Block::new().borders(Borders::ALL).title("Tree Widget"));
/// .block(Block::bordered().title("Tree Widget"));
///
/// f.render_stateful_widget(tree_widget, area, &mut state);
/// })?;
Expand Down

0 comments on commit 4cbe932

Please sign in to comment.