Skip to content

Commit

Permalink
fixing clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
folkengine committed Mar 23, 2024
1 parent c6ce5b0 commit 06e956a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
5 changes: 0 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
FROM mcr.microsoft.com/devcontainers/rust:latest

# install a few tools for more convenient developing
#RUN apt-get update; \
# apt-get -y install --fix-missing \
# git python3 cmake g++ python-is-python3

# [Optional] Uncomment this section to install additional packages.
#RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends python-is-python3
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cardpack"
description = "Generic Deck of Cards"
version = "0.5.0"
version = "0.5.1"
authors = ["electronicpanopticon <[email protected]>"]
repository = "https://github.com/ImperialBower/cardpack.rs.git"
homepage = "https://github.com/ImperialBower/cardpack.rs"
Expand Down
9 changes: 4 additions & 5 deletions src/cards/pile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::collections::HashMap;
use std::collections::HashSet;
use std::fmt;
use std::fmt::Write;
use std::iter::FromIterator;
use unic_langid::LanguageIdentifier;

use crate::cards::card::Card;
Expand Down Expand Up @@ -223,8 +222,8 @@ impl Pile {
}

fn fold_in(&mut self, suits: &[Suit], ranks: &[Rank]) {
for (_, suit) in suits.iter().enumerate() {
for (_, rank) in ranks.iter().enumerate() {
for suit in suits {
for rank in ranks {
self.push(Card::new(*rank, *suit));
}
}
Expand Down Expand Up @@ -624,13 +623,13 @@ impl Pile {
let (_, major_arcana_suit) = arcana_suits_enumerator.next().unwrap();

// Generate Major Arcana
for (_, rank) in major_arcana_ranks.iter().enumerate() {
for rank in &major_arcana_ranks {
cards.push(Card::new(*rank, *major_arcana_suit));
}

// Generate Minor Arcana
for (_, suit) in arcana_suits_enumerator {
for (_, rank) in minor_arcana_ranks.iter().enumerate() {
for rank in &minor_arcana_ranks {
cards.push(Card::new(*rank, *suit));
}
}
Expand Down

0 comments on commit 06e956a

Please sign in to comment.