Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ralf Jung <post@ralfj.de>
  • Loading branch information
CAD97 and RalfJung committed Jan 13, 2021
1 parent b5b6760 commit c14e919
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/alloc/src/rc.rs
Expand Up @@ -1881,7 +1881,7 @@ impl<T: ?Sized> Weak<T> {

if is_dangling(ptr) {
// If the pointer is dangling, we return the sentinel directly. This cannot be
// a valid payload address, as it is at least as aligned as RcBox (usize).
// a valid payload address, as the payload is at least as aligned as RcBox (usize).
ptr as *const T
} else {
// SAFETY: if is_dangling returns false, then the pointer is dereferencable.
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/sync.rs
Expand Up @@ -1666,7 +1666,7 @@ impl<T: ?Sized> Weak<T> {

if is_dangling(ptr) {
// If the pointer is dangling, we return the sentinel directly. This cannot be
// a valid payload address, as it is at least as aligned as ArcInner (usize).
// a valid payload address, as the payload is at least as aligned as ArcInner (usize).
ptr as *const T
} else {
// SAFETY: if is_dangling returns false, then the pointer is dereferencable.
Expand Down

0 comments on commit c14e919

Please sign in to comment.