Skip to content

Commit

Permalink
chore(src/lib.rs): RandomState now exported in std::hash (#69)
Browse files Browse the repository at this point in the history
* chore(src/lib.rs): `RandomState` now exported in `std::hash`

see https://github.com/rust-lang/rust/releases/tag/1.76.0
see rust-lang/rust#115694

* chore(ci/cd): handle `rustup update stable`

when there is a version mismatch between stable toolchain
installed on runner (used) and stable toolchain available
from upstream (latest)
  • Loading branch information
andros21 committed Feb 11, 2024
1 parent 9b87554 commit 389230d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
latest="$(curl -sL https://api.github.com/repos/rust-lang/rust/releases/latest | jq -r .tag_name)"
echo "rust stable latest: ${latest}"
echo "stable_latest=${latest}" >> "$GITHUB_OUTPUT"
echo "rust stable used: ${used}"
used="$(cargo --version | awk '{print $2}')"
echo "stable_used=${used}" >> "$GITHUB_OUTPUT"
- name: check cache
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2
id: cache
Expand All @@ -46,6 +49,10 @@ jobs:
~/.rustup/
target/
key: ${{ runner.os }}-rust-${{ steps.rust.outputs.stable_latest }}-${{ hashFiles('Cargo.toml') }}-${{ hashFiles('Cargo.lock') }}
- name: update toolchain
if: steps.rust.outputs.stable_latest != steps.rust.outputs.stable_used
run: |
rustup update stable
- name: cargo fmt
run: |
cargo fmt -- --check --verbose
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
use gloo_events::EventListener;
use gloo_timers::callback::Interval;
use serde::Deserialize;
use std::collections::hash_map::RandomState;
use std::collections::HashMap;
use std::hash::{BuildHasher, Hasher};
use std::hash::{BuildHasher, Hasher, RandomState};
use wasm_bindgen::prelude::*;
use web_sys::{Document, Element, HtmlAudioElement, HtmlElement, HtmlInputElement};

Expand Down

0 comments on commit 389230d

Please sign in to comment.