Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
boldandbrad committed Mar 18, 2024
1 parent e4efad6 commit 7b84b77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/interface/components/cards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,13 @@ pub fn bottom_player_cards(cards: Vec<Card>) -> Paragraph<'static> {
}

let mut hand_area = vec!["".to_string(); CARD_HEIGHT];
for (_idx, card_area) in card_areas.iter().enumerate() {
for card_area in card_areas.iter() {
for (idx, line) in card_area.iter().enumerate() {
hand_area[idx].push_str(VERTICAL_CARD_LEFT_EDGE[idx]);
hand_area[idx].push_str(&line);
hand_area[idx].push_str(line);
hand_area[idx].push_str(VERTICAL_CARD_RIGHT_EDGE[idx]);
}
}

string_vec_to_paragraph(hand_area)
}

Expand Down
4 changes: 2 additions & 2 deletions src/interface/screens/game_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ impl Screen for GameScreen {
}
}

fn build_card_lines(hand: &Vec<Card>) -> Text {
fn build_card_lines(hand: &[Card]) -> Text {
let mut lines = vec![];
for card in hand.clone() {
for card in hand.iter().copied() {
let line = Line::from(card.get_name());
lines.push(line);
}
Expand Down

0 comments on commit 7b84b77

Please sign in to comment.