Skip to content

Commit

Permalink
chore(toolchain): bump toolchain to 1.72.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoticlonghair committed Sep 27, 2023
1 parent d78e15b commit 2749968
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
RUST_BACKTRACE: full
RUST_TOOLCHAIN: 1.67.1
RUST_TOOLCHAIN: 1.72.1
jobs:
rustfmt:
name: Checks / Format
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
RUST_TOOLCHAIN: 1.67.1
RUST_TOOLCHAIN: 1.72.1
jobs:
release:
name: Build & Release
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.67.1
1.72.1
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ impl<'a> SendLastStateProofProcess<'a> {
.iter()
.skip(old_last_headers_len.saturating_sub(required_count))
.map(ToOwned::to_owned)
.chain(new_last_headers.into_iter())
.chain(new_last_headers)
.collect::<Vec<_>>()
}
} else if reorg_count == 0 {
Expand Down
16 changes: 7 additions & 9 deletions src/protocols/light_client/peers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1329,14 +1329,12 @@ impl Peers {
for mut pair in self.inner.iter_mut() {
pair.value_mut().add_block(&block_hash);
}
matched_blocks
.get_mut(&block_hash.unpack())
.map(|mut value| {
if value.0 {
value.1 = Some(block);
}
value.0
})
matched_blocks.get_mut(&block_hash.unpack()).map(|value| {
if value.0 {
value.1 = Some(block);
}
value.0
})
}

pub(crate) fn add_header(&self, block_hash: &Byte32) -> bool {
Expand Down Expand Up @@ -1391,7 +1389,7 @@ impl Peers {
block_hashes: &[Byte32],
) {
for block_hash in block_hashes {
if let Some(mut value) = matched_blocks.get_mut(&block_hash.unpack()) {
if let Some(value) = matched_blocks.get_mut(&block_hash.unpack()) {
value.0 = true;
}
}
Expand Down

0 comments on commit 2749968

Please sign in to comment.