mozilla-services / autopush-rs

Push Server in Rust
Mozilla Public License 2.0
197 stars 15 forks source link

autopush: Enforce must_use on Db's update_user #496

Closed data-sync-user closed 2 months ago

data-sync-user commented 10 months ago

This now returns a boolean of whether the operation actually occurred due to a conditional on the db update. As a safety precaution calling code should be forced to #[must_use] the result to encourage them appropriately handling when an update doesn’t occur.

This would have to be implemented with something like a wrapper struct (e.g. MustUse<T>) around the bool.

┆Issue is synchronized with this Jira Task

data-sync-user commented 2 months ago

➤ JR Conlin commented:

Not required and adds too much complexity.