mirror of
https://gitee.com/openharmony/third_party_rust_lazycell
synced 2024-11-23 15:40:34 +00:00
68f3415dd5
Modify the `fill()` method of the `LazyCell` struct to return `Err(value)` when attempting to fill an already filled `LazyCell`. This is a replacement for the previous behaviour, which would return a panic instead. The new behaviour is preferred because it allows downstream crates to handle the error case better. Modify tests to accomodate changes in the error behaviour of the `fill()` method of the `LazyCell` struct. BREAKING CHANGE: the `fill()` method of the `LazyCell` struct now returns a `Result<(), T>`, which must be handled. The previous behaviour was to simply panic. |
||
---|---|---|
.. | ||
lib.rs |