Skip to content

Commit c14e919

Browse files
CAD97RalfJung
andauthored
Apply suggestions from code review
Co-authored-by: Ralf Jung <[email protected]>
1 parent b5b6760 commit c14e919

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/alloc/src/rc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1881,7 +1881,7 @@ impl<T: ?Sized> Weak<T> {
18811881

18821882
if is_dangling(ptr) {
18831883
// If the pointer is dangling, we return the sentinel directly. This cannot be
1884-
// a valid payload address, as it is at least as aligned as RcBox (usize).
1884+
// a valid payload address, as the payload is at least as aligned as RcBox (usize).
18851885
ptr as *const T
18861886
} else {
18871887
// SAFETY: if is_dangling returns false, then the pointer is dereferencable.

library/alloc/src/sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,7 @@ impl<T: ?Sized> Weak<T> {
16661666

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

0 commit comments

Comments
 (0)