rustonaut / vec1

Rust `Vec<T>` wrapper that gurantees to contain at least 1 element
Apache License 2.0
88 stars 15 forks source link

implement `Default` when `T` has a default #8

Closed Ryan1729 closed 5 years ago

Ryan1729 commented 5 years ago

Given everything in a struct has a sensible default, it's nice to be able to initialize things with Default::default(). This default seems like the only sensible one to me.

rustonaut commented 5 years ago

@Ryan1729 Thanks for the pull request.

I have merged it and published a new version (v1.4.0) on crates.io.