Skip to content

Commit

Permalink
bump version and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdw committed Nov 9, 2023
1 parent 050a0ae commit 6e88d16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ The format is based on [Keep a Changelog].

[Keep a Changelog]: http://keepachangelog.com/en/1.0.0/

## 0.10.0 - 2023-11-09

This release changes `IntoVisitor` to require that the corresponding `Visitor` implements `scale_decode::Error`, rather than allowing the error to be anything that can be converted into a `scale_decode::Error`. This has the following advantages:

- It makes `DecodeAsType` a proper supertrait of `IntoVisitor`, meaning it can be used anywhere `IntoVisitor` is. Previously, using `DecodeAsType` in some places also required that you add a bound like `B: IntoVisitor, <B::Visitor as Visitor>::Error: Into<scale_decode::Error`, ie the `Error` type needed to explicitly be declared as convertible in the way that `DecodeAsType` requires.
- It simplifies the code a little, making it a bit easier to understand how to correctly make a type implement `DecodeAsType`.

The main drawback is that you can no longer have a `Visitor` implementation that returns a custom error type, and then also use that `Visitor` to build a `DecodeAsType` implementation; instead, any `Visitor` must use the `scale_decode::Error` up front. This is a shame, but hopefully not something that we'll run into in practice, since most implementations will come from the `#[derive(DecodeAsType)]` macro.

## 0.9.0 - 2023-08-02

- Change how compact encoding is handled: `visit_compact_*` functions are removed from the `Visitor` trait, and
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.9.0"
version = "0.10.0"
authors = ["Parity Technologies <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down

0 comments on commit 6e88d16

Please sign in to comment.