You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[derive(Debug,Clone, serde::Serialize, serde::Deserialize)]pubstructS{pubKey:[u8;32]// or Vec<u8>, it produce the same error}fnmain(){let data = vec![161,102,112,117,98,75,101,121,88,32,189,182,166,93,174,37,6,247,39,203,228,101,121,197,203,42,98,138,145,12,12,76,145,168,132,185,90,18,54,28,248,170];let r = ciborium::de::from_reader::<S,_>(&data[..]);println!("{:?}", r);}
Decoding bytes into a Vec<u8> or [u8; N] would be nice
Environment Information
Cargo.toml:
[package]
name = "z"version = "0.1.0"edition = "2021"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
serde = { version = "1", features = ["derive"] }
ciborium = "0.2.0"
Steps To Reproduce
No response
The text was updated successfully, but these errors were encountered:
Also, this fails other way around. Serializing Vec<u8> results in an array. So, there is no obvious way to serialize Vec<u8> as ciborium::value::Value::Bytes.
Is there an existing issue for this?
Code of Conduct
Current Behaviour
This code :
Produce this error :
Expected Behaviour
Decoding bytes into a
Vec<u8>
or[u8; N]
would be niceEnvironment Information
Cargo.toml
:Steps To Reproduce
No response
The text was updated successfully, but these errors were encountered: