Bump to latest scale-encode/decode/value and fix test running (#1103)

* Bump to latest scale-encode,decode,value and fix test running

* remove patch deps

* update CI to spit out 'substrate-node' binary now

* fmt

* Fix test: compact type ID no longer present so can't re-encode Value in same way

* remove patch

* Fix cargo.lock

* Fix other compact test
This commit is contained in:
James Wilson
2023-08-02 13:55:48 +01:00
committed by GitHub
parent fd853b9b72
commit 2176ec9fa7
10 changed files with 80 additions and 105 deletions
+4 -4
View File
@@ -121,9 +121,9 @@ impl<T> Visitor for WrapperKeepOpaqueVisitor<T> {
use scale_decode::error::{Error, ErrorKind};
if value.path().ident().as_deref() != Some("WrapperKeepOpaque") {
return Err(Error::new(ErrorKind::Custom(
"Type to decode is not 'WrapperTypeKeepOpaque'".into(),
)));
return Err(Error::custom_str(
"Type to decode is not 'WrapperTypeKeepOpaque'",
));
}
if value.remaining() != 2 {
return Err(Error::new(ErrorKind::WrongLength {
@@ -140,7 +140,7 @@ impl<T> Visitor for WrapperKeepOpaqueVisitor<T> {
// Sanity check that the compact length we decoded lines up with the number of bytes encoded in the next field.
if field.bytes().len() != len as usize {
return Err(Error::new(ErrorKind::Custom("WrapperTypeKeepOpaque compact encoded length doesn't line up with encoded byte len".into())));
return Err(Error::custom_str("WrapperTypeKeepOpaque compact encoded length doesn't line up with encoded byte len"));
}
Ok(WrapperKeepOpaque {