Skip to content

Commit 8cde4c8

Browse files
jsdwgui1117
andauthored
Prep to release 3.7.0 (#646)
* Prep to release 3.7.1 * Consistify some fields and version across workspace * require only derive 3.6.8 or above to avoid ddry-run CI issue. 3.7.1 should be selected anyway * Go down to 3.7.0 - that version wasn't released yet * Add other recent changes * trailing newline * Set MSRV to 1.79 since we get compile errors on earlier versions * Add CountedInput to changelog Co-authored-by: Guillaume Thiolliere <[email protected]> * clippy * update release date --------- Co-authored-by: Guillaume Thiolliere <[email protected]>
1 parent 2ef70dc commit 8cde4c8

File tree

5 files changed

+42
-19
lines changed

5 files changed

+42
-19
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ All notable changes to this crate are documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this crate adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.7.0] - 2024-11-18
9+
10+
### Added
11+
12+
- Allow decoding with a memory limit. ([616](https://github.com/paritytech/parity-scale-codec/pull/616))
13+
- Introduce `CountedInput`, an wrapper on `Input` that counts the bytes read. ([630](https://github.com/paritytech/parity-scale-codec/pull/630))
14+
15+
### Changed
16+
17+
- This release bumps some dependencies, primarily bumping `syn` to 2. ([#640](https://github.com/paritytech/parity-scale-codec/pull/640)).
18+
19+
### Fixed
20+
21+
- Fix MaxEncodedLen derive macro for enum with skipped variant ([#622](https://github.com/paritytech/parity-scale-codec/pull/622))
22+
- Use MAX_PREALLOCATION consistently [#605](https://github.com/paritytech/parity-scale-codec/pull/605)
23+
824
## [3.6.4] - 2023-07-14
925

1026
### Added

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[package]
22
name = "parity-scale-codec"
33
description = "SCALE - Simple Concatenating Aggregated Little Endians"
4-
version = "3.7.0"
5-
authors = ["Parity Technologies <[email protected]>"]
6-
license = "Apache-2.0"
7-
repository = "https://github.com/paritytech/parity-scale-codec"
8-
categories = ["encoding"]
9-
edition = "2021"
4+
version.workspace = true
5+
authors.workspace = true
6+
license.workspace = true
7+
repository.workspace = true
8+
categories.workspace = true
9+
edition.workspace = true
1010
build = "build.rs"
11-
rust-version = "1.60.0"
11+
rust-version.workspace = true
1212

1313
[dependencies]
1414
arrayvec = { version = "0.7", default-features = false }
1515
serde = { version = "1.0.215", default-features = false, optional = true }
16-
parity-scale-codec-derive = { path = "derive", version = ">= 3.6.8", default-features = false, optional = true }
16+
parity-scale-codec-derive = { path = "derive", version = "3.6.8", default-features = false, optional = true }
1717
bitvec = { version = "1", default-features = false, features = ["alloc"], optional = true }
1818
bytes = { version = "1", default-features = false, optional = true }
1919
byte-slice-cast = { version = "1.2.2", default-features = false }
@@ -62,3 +62,12 @@ full = []
6262

6363
[workspace]
6464
members = ["derive", "fuzzer"]
65+
66+
[workspace.package]
67+
version = "3.7.0"
68+
authors = ["Parity Technologies <[email protected]>"]
69+
license = "Apache-2.0"
70+
repository = "https://github.com/paritytech/parity-scale-codec"
71+
categories = ["encoding"]
72+
edition = "2021"
73+
rust-version = "1.79.0"

derive/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
name = "parity-scale-codec-derive"
33
description = "Serialization and deserialization derive macro for Parity SCALE Codec"
4-
version = "3.6.8"
5-
authors = ["Parity Technologies <[email protected]>"]
6-
license = "Apache-2.0"
7-
edition = "2021"
8-
rust-version = "1.56.1"
9-
repository = "https://github.com/paritytech/parity-scale-codec"
4+
version.workspace = true
5+
authors.workspace = true
6+
license.workspace = true
7+
edition.workspace = true
8+
repository.workspace = true
9+
rust-version.workspace = true
1010

1111
[lib]
1212
proc-macro = true

src/counted_input.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,14 @@ impl<I: crate::Input> crate::Input for CountedInput<'_, I> {
4040
}
4141

4242
fn read(&mut self, into: &mut [u8]) -> Result<(), crate::Error> {
43-
self.input.read(into).map(|r| {
43+
self.input.read(into).inspect(|_r| {
4444
self.counter = self.counter.saturating_add(into.len().try_into().unwrap_or(u64::MAX));
45-
r
4645
})
4746
}
4847

4948
fn read_byte(&mut self) -> Result<u8, crate::Error> {
50-
self.input.read_byte().map(|r| {
49+
self.input.read_byte().inspect(|_r| {
5150
self.counter = self.counter.saturating_add(1);
52-
r
5351
})
5452
}
5553

0 commit comments

Comments
 (0)