Skip to content

Commit

Permalink
Remove misleading doc-comment (#1836)
Browse files Browse the repository at this point in the history
No such guarantee exists for conversion between `Box<T>` and `Arc<T>`
and the current [^1] implementation *always* creates a new allocation.
I'm not aware of other container types for which the comment is
correct.

[^1]: https://doc.rust-lang.org/1.81.0/src/alloc/sync.rs.html#1950-1970
  • Loading branch information
Freax13 authored Oct 7, 2024
1 parent 1271aa0 commit 6812ee8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2947,9 +2947,6 @@ pub unsafe trait FromZeros: TryFromBytes {
/// pre-zeroed memory, using `new_box_zeroed` (or related functions) may
/// have performance benefits.
///
/// Note that `Box<Self>` can be converted to `Arc<Self>` and other
/// container types without reallocation.
///
/// # Errors
///
/// Returns an error on allocation failure. Allocation failure is guaranteed
Expand Down

0 comments on commit 6812ee8

Please sign in to comment.