Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
boundless-forest committed Dec 22, 2023
1 parent f5e3f3b commit 11c6faa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/app/dashboard/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ where
},
KeyCode::Left =>
if dash_board.selected_tab == 2 && dash_board.selected_pallet_info_tab > 0 {
dash_board.selected_pallet_info_tab = dash_board.selected_pallet_info_tab - 1;
dash_board.selected_pallet_info_tab -= 1;
},
_ => {},
}
Expand Down
15 changes: 7 additions & 8 deletions src/app/dashboard/tab_pallets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ fn render_pallet_constants_page<CI: ChainInfo>(f: &mut Frame, dash_board: &mut D
if let Some(pallet) = pallet {
let constants: Vec<ListItem> = pallet
.constants()
.into_iter()
.map(|c| {
let ty_id = c.ty();
let mut bytes = c.value();
Expand All @@ -88,7 +87,7 @@ fn render_pallet_constants_page<CI: ChainInfo>(f: &mut Frame, dash_board: &mut D
})
.collect();

if constants.len() != 0 {
if !constants.is_empty() {
let l = List::new(constants).block(block_style);
f.render_widget(l, area);
} else {
Expand Down Expand Up @@ -124,7 +123,7 @@ fn render_pallet_events_page<CI: ChainInfo>(f: &mut Frame, dash_board: &mut Dash
},
};

if enums.len() != 0 {
if !enums.is_empty() {
let l = List::new(enums).block(block_style);
f.render_widget(l, area);
} else {
Expand Down Expand Up @@ -166,7 +165,7 @@ fn render_pallet_errors_page<CI: ChainInfo>(f: &mut Frame, dash_board: &mut Dash
},
};

if enums.len() != 0 {
if !enums.is_empty() {
let l = List::new(enums).block(block_style);
f.render_widget(l, area);
} else {
Expand All @@ -191,16 +190,16 @@ fn render_pallet_storages_page<CI: ChainInfo>(f: &mut Frame, dash_board: &mut Da
if let Some(s) = pallet.storage() {
let storages: Vec<ListItem> = s
.entries()
.into_iter()
.iter()
.map(|e| {
ListItem::new(vec![Line::from(Span::styled(
format!("> {} : {}", e.name(), &print_storage_type(e.entry_type().clone(), &dash_board.metadata)),
format!("> {} : {}", e.name(), &print_storage_type(e.entry_type().clone(), dash_board.metadata)),
Style::default().fg(Color::Yellow),
))])
})
.collect();

if storages.len() != 0 {
if !storages.is_empty() {
let l = List::new(storages).block(block_style);
f.render_widget(l, area);
} else {
Expand Down Expand Up @@ -241,7 +240,7 @@ fn render_pallet_calls_page<CI: ChainInfo>(f: &mut Frame, dash_board: &mut DashB
},
};

if enums.len() != 0 {
if !enums.is_empty() {
let l = List::new(enums).block(block_style);
f.render_widget(l, area);
} else {
Expand Down

0 comments on commit 11c6faa

Please sign in to comment.