Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issues on audit #48

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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