0xPolygonMiden / miden-base

Core components of the Polygon Miden rollup
MIT License
73 stars 45 forks source link

Implement `InputNotes::default` #928

Closed Mirko-von-Leipzig closed 4 weeks ago

Mirko-von-Leipzig commented 1 month ago

InputNotes::new is fallible, but cannot fail when created with an empty set. Implementing Default should therefore be possible, and remove the need for

InputNotes::new(vec![]).expect("Empty notes cannot fail")`

style constructors. There are other similar constructs e.g. this one in notes to which this could also apply.

See here as an example.

bobbinth commented 1 month ago

Aren't these already implemented here and here?

Mirko-von-Leipzig commented 4 weeks ago

I'm blind; apologies.