spaceapi-community / spaceapi-rs

Rust types and serialization for the Space API.
https://crates.io/crates/spaceapi
Apache License 2.0
6 stars 9 forks source link

Use get_or_insert to add values to Option<Vec> fields #68

Closed rnestler closed 6 years ago

rnestler commented 7 years ago

This method was added in Rust 1.20.0. See: https://doc.rust-lang.org/std/option/enum.Option.html#method.get_or_insert

It simplifies the code a lot.

Checklist

rnestler commented 7 years ago

Since this bumps the minimal required Rust version, is this considered a breaking change?

dbrgn commented 7 years ago

Nice, I like the change :)

Since this bumps the minimal required Rust version, is this considered a breaking change?

I'd say so, yes.

rnestler commented 6 years ago

@dbrgn Ping :smiley: