-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance indexing and arithmetic safety #22
Comments
Hey @ralexstokes! As part of our production readiness of https://github.com/Snowfork/snowbridge I will be taking a look at these. |
@0xTylerHolmes found a panic here :) use ssz_rs::prelude::*;
type Bar = Vector<u8, 96>;
#[derive(PartialEq, Eq, Debug, Default, Clone, SimpleSerialize)]
pub struct Foo {
pub bar: Bar,
}
fn main() {
let data = vec![];
let foo = Foo::deserialize(&data);
dbg!(foo);
} and what fails is this: https://github.com/ralexstokes/ssz-rs/blob/main/ssz-rs-derive/src/lib.rs#L202 where the range on instead, we should use https://doc.rust-lang.org/std/vec/struct.Vec.html#method.get and note to whoever fixes this: we should also review all of the direct indexing ops and switch to |
this should be addressed by all of the work linked here once #57 is merged great work everyone and thank you all SO much for improving this library |
analogues of these:
ralexstokes/ethereum-consensus#151
ralexstokes/ethereum-consensus#152
for this repo :)
The text was updated successfully, but these errors were encountered: