Skip to content

Commit

Permalink
make Clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine committed Aug 21, 2023
1 parent 6faa82c commit 324d384
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ fn repr_data(data: &Value, cell_path: &[PathMember]) -> Vec<DataRowRepr> {

/// TODO: documentation
fn is_table(value: &Value, cell_path: &[PathMember]) -> Option<bool> {
match value.clone().follow_cell_path(&cell_path, false) {
match value.clone().follow_cell_path(cell_path, false) {
Ok(Value::List { vals, .. }) => {
if vals.is_empty() {
Some(false)
Expand Down Expand Up @@ -256,7 +256,7 @@ fn render_data(
None => 0,
};

if is_table(&data, &data_path).expect("cell path is invalid when checking for table") {
if is_table(data, &data_path).expect("cell path is invalid when checking for table") {
let (header, rows) = match data
.clone()
.follow_cell_path(&data_path, false)
Expand Down

0 comments on commit 324d384

Please sign in to comment.