Skip to content

Commit

Permalink
Fixed issues on audit (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
folkengine committed Oct 3, 2023
1 parent 6f811cc commit e1f980f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
strategy:
fail-fast: false
matrix:
rust: [beta, stable, 1.63.0]
rust: [beta, stable, 1.66.0]
include:
- rust: nightly
rustflags: --cfg thiserror_nightly_testing
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
Expand All @@ -38,7 +38,7 @@ jobs:
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
Expand All @@ -51,7 +51,7 @@ jobs:
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: SecurityAudit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: taiki-e/install-action@cargo-deny
- name: Scan for vulnerabilities
run: cargo deny check advisories
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "cardpack"
description = "Generic Deck of Cards"
version = "0.4.19"
version = "0.4.20"
authors = ["electronicpanopticon <[email protected]>"]
repository = "https://github.com/ImperialBower/cardpack.rs.git"
homepage = "https://github.com/ImperialBower/cardpack.rs"
edition = "2021"
rust-version = "1.63"
rust-version = "1.66"
license = "Apache-2.0"
exclude = [".github/workflows/*", "examples/*", ".gitignore", ".travis.yml", "Cargo.lock"]

Expand Down
2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
msrv = "1.63"
msrv = "1.66"

cognitive-complexity-threshold = 30

12 changes: 6 additions & 6 deletions src/cards/pile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use rand::thread_rng;
use std::collections::HashMap;
use std::collections::HashSet;
use std::fmt;
use std::fmt::Write;
use std::iter::FromIterator;
use unic_langid::LanguageIdentifier;

Expand Down Expand Up @@ -639,12 +640,11 @@ impl Pile {

#[must_use]
pub fn sig_generate_from_strings(strings: &[String]) -> String {
strings
.iter()
.map(|s| format!("{s} "))
.collect::<String>()
.trim_end()
.to_string()
let out = strings.iter().fold(String::new(), |mut output, s| {
let _ = write!(output, "{s} ");
output
});
out.trim_end().to_string()
}
}

Expand Down

0 comments on commit e1f980f

Please sign in to comment.