Skip to content

Commit

Permalink
Update ratatui to 0.26.3
Browse files Browse the repository at this point in the history
  • Loading branch information
lusingander committed May 22, 2024
1 parent d8fa56e commit b3fc6fc
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 18 deletions.
16 changes: 13 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ humansize = "2.1.3"
itertools = "0.13.0"
itsuki = "0.2.0"
open = "5.1.3"
ratatui = { version = "0.26.2", features = [
ratatui = { version = "0.26.3", features = [
"all-widgets",
"unstable-widget-ref",
] }
Expand Down
3 changes: 1 addition & 2 deletions src/widget/copy_detail_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ fn build_list_item(
#[cfg(test)]
mod tests {
use chrono::{DateTime, Local, NaiveDateTime};
use ratatui::assert_buffer_eq;

use crate::set_cells;

Expand Down Expand Up @@ -164,7 +163,7 @@ mod tests {
(4..36, [5, 6]) => fg: Color::Cyan,
}

assert_buffer_eq!(buf, expected);
assert_eq!(buf, expected);
}

fn file_detail() -> FileDetail {
Expand Down
8 changes: 3 additions & 5 deletions src/widget/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ impl Header {

#[cfg(test)]
mod tests {
use ratatui::assert_buffer_eq;

use super::*;

#[test]
Expand All @@ -89,7 +87,7 @@ mod tests {
"β”‚ bucket / key01 / key02 / key03 β”‚",
"β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜",
]);
assert_buffer_eq!(buf, expected);
assert_eq!(buf, expected);
}

#[test]
Expand All @@ -108,7 +106,7 @@ mod tests {
"β”‚ bucket / ... / key02a / key03 β”‚",
"β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜",
]);
assert_buffer_eq!(buf, expected);
assert_eq!(buf, expected);
}

#[test]
Expand All @@ -123,6 +121,6 @@ mod tests {
"β”‚ β”‚",
"β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜",
]);
assert_buffer_eq!(buf, expected);
assert_eq!(buf, expected);
}
}
3 changes: 1 addition & 2 deletions src/widget/save_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ impl StatefulWidget for SaveDialog {
#[cfg(test)]
mod tests {
use crossterm::event::KeyCode;
use ratatui::assert_buffer_eq;

use super::*;

Expand Down Expand Up @@ -105,7 +104,7 @@ mod tests {
" ",
]);

assert_buffer_eq!(buf, expected);
assert_eq!(buf, expected);
assert_eq!(state.cursor(), (12, 9));
}
}
10 changes: 5 additions & 5 deletions src/widget/scroll_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ fn format_list_count(total_count: usize, selected: usize) -> String {

#[cfg(test)]
mod tests {
use ratatui::{assert_buffer_eq, text::Line};
use ratatui::text::Line;

use super::*;

Expand Down Expand Up @@ -171,7 +171,7 @@ mod tests {
"β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜",
]);

assert_buffer_eq!(buf, expected);
assert_eq!(buf, expected);
}

#[test]
Expand All @@ -196,7 +196,7 @@ mod tests {
"β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜",
]);

assert_buffer_eq!(buf, expected);
assert_eq!(buf, expected);

for _ in 0..9 {
state.select_next();
Expand All @@ -219,7 +219,7 @@ mod tests {
"β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜",
]);

assert_buffer_eq!(buf, expected);
assert_eq!(buf, expected);

for _ in 0..4 {
state.select_next();
Expand All @@ -242,7 +242,7 @@ mod tests {
"β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜",
]);

assert_buffer_eq!(buf, expected);
assert_eq!(buf, expected);
}

fn render_scroll_list(state: &mut ScrollListState) -> Buffer {
Expand Down

0 comments on commit b3fc6fc

Please sign in to comment.