Closed Mirko-von-Leipzig closed 4 weeks 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
Default
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.
Aren't these already implemented here and here?
I'm blind; apologies.
InputNotes::new
is fallible, but cannot fail when created with an empty set. ImplementingDefault
should therefore be possible, and remove the need forstyle constructors. There are other similar constructs e.g. this one in notes to which this could also apply.
See here as an example.