Skip to content

Commit

Permalink
Fix CI warnings.
Browse files Browse the repository at this point in the history
The warnings are mainly due to
actions-rs/toolchain#221.
This commit also fixes additional warnings from newer rules in clippy.
  • Loading branch information
yotarok committed Dec 19, 2022
1 parent 52d6b20 commit cbdd6f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install latest nightly
uses: actions-rs/toolchain@v1
# uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
override: true
Expand All @@ -39,7 +40,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install latest nightly
uses: actions-rs/toolchain@v1
# uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
override: true
Expand Down
7 changes: 2 additions & 5 deletions src/coding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ impl Hyp {
let prev_bits = back_pointer.as_ref().map_or(0, |h| h.bits);
let mut md5_context = back_pointer
.as_ref()
.map_or(md5::Context::new(), |h| h.md5_context.clone());
.map_or_else(md5::Context::new, |h| h.md5_context.clone());
framebuf.update_md5(
stream_info.bits_per_sample(),
frame_samples,
Expand Down Expand Up @@ -722,10 +722,7 @@ mod tests {
source::PreloadedSignal::from_samples(&signal, channels, bits_per_sample, sample_rate);
let stream = encode_with_fixed_block_size(&config::Encoder::default(), source, block_size)
.expect("Source read error");
eprintln!(
"MD5 of DC signal ({}) with len={} and ch={} was",
constant, signal_len, channels
);
eprintln!("MD5 of DC signal ({constant}) with len={signal_len} and ch={channels} was",);
eprint!("[");
for &b in stream.stream_info().md5() {
eprint!("0x{b:02X}, ");
Expand Down

0 comments on commit cbdd6f1

Please sign in to comment.