projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tag `KVStore` `(C-not exported)` as `Writeable` isn't mapped
[rust-lightning]
/
lightning
/
src
/
util
/
ser.rs
diff --git
a/lightning/src/util/ser.rs
b/lightning/src/util/ser.rs
index 8056f3bed35569e952c6897a4b999b6e2bf3b1fd..77ee33c4fa099de78ef6bac9f7c1cfd210586f73 100644
(file)
--- a/
lightning/src/util/ser.rs
+++ b/
lightning/src/util/ser.rs
@@
-749,7
+749,7
@@
where T: Readable + Eq + Hash
}
// Vectors
}
// Vectors
-macro_rules! impl_for_vec {
+macro_rules! impl_
writeable_
for_vec {
($ty: ty $(, $name: ident)*) => {
impl<$($name : Writeable),*> Writeable for Vec<$ty> {
#[inline]
($ty: ty $(, $name: ident)*) => {
impl<$($name : Writeable),*> Writeable for Vec<$ty> {
#[inline]
@@
-761,7
+761,10
@@
macro_rules! impl_for_vec {
Ok(())
}
}
Ok(())
}
}
-
+ }
+}
+macro_rules! impl_readable_for_vec {
+ ($ty: ty $(, $name: ident)*) => {
impl<$($name : Readable),*> Readable for Vec<$ty> {
#[inline]
fn read<R: Read>(r: &mut R) -> Result<Self, DecodeError> {
impl<$($name : Readable),*> Readable for Vec<$ty> {
#[inline]
fn read<R: Read>(r: &mut R) -> Result<Self, DecodeError> {
@@
-777,6
+780,12
@@
macro_rules! impl_for_vec {
}
}
}
}
}
}
+macro_rules! impl_for_vec {
+ ($ty: ty $(, $name: ident)*) => {
+ impl_writeable_for_vec!($ty $(, $name)*);
+ impl_readable_for_vec!($ty $(, $name)*);
+ }
+}
impl Writeable for Vec<u8> {
#[inline]
impl Writeable for Vec<u8> {
#[inline]
@@
-805,6
+814,8
@@
impl Readable for Vec<u8> {
impl_for_vec!(ecdsa::Signature);
impl_for_vec!(crate::ln::channelmanager::MonitorUpdateCompletionAction);
impl_for_vec!((A, B), A, B);
impl_for_vec!(ecdsa::Signature);
impl_for_vec!(crate::ln::channelmanager::MonitorUpdateCompletionAction);
impl_for_vec!((A, B), A, B);
+impl_writeable_for_vec!(&crate::routing::router::BlindedTail);
+impl_readable_for_vec!(crate::routing::router::BlindedTail);
impl Writeable for Script {
fn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
impl Writeable for Script {
fn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {