Closed Bug 1667019 Opened 4 years ago Closed 4 years ago

Simplify moving Result for PackingStrategy NullIsOk

Categories

(Core :: MFBT, task)

task

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: sg, Assigned: sg)

References

Details

Attachments

(1 file)

Currenty, moving a Result with PackingStrategy NullIsOk resets the moved-from object to an error value. This is unnecessary, and requires the provision of a default error value in UnusedZero, which may be confusing depending on the type.

No longer reset a moved-from Result to an error state, which required
UnusedZero<E>::GetDefaultValue, which was somewhat confusing, and might
also be inefficient. Leaving Result in a valid state, which might be a
success or error state is sufficient.

Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/069d780699da
Simplify moving of Results for PackingStrategy NullIsOk. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: