You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clippy_lints/src/functions/mod.rs
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -410,8 +410,9 @@ declare_clippy_lint! {
410
410
/// `&Option<T>` in a function signature breaks encapsulation because the caller must own T
411
411
/// and move it into an Option to call with it. When returned, the owner must internally store
412
412
/// it as `Option<T>` in order to return it.
413
-
/// At a lower level `&Option<T>` points to memory that has `presence` bit flag + value,
414
-
/// whereas `Option<&T>` is always optimized to a single pointer.
413
+
/// At a lower level, `&Option<T>` points to memory with the `presence` bit flag plus the `T` value,
414
+
/// whereas `Option<&T>` is usually [optimized](https://doc.rust-lang.org/1.81.0/std/option/index.html#representation)
415
+
/// to a single pointer, so it may be more optimal.
415
416
///
416
417
/// See this [YouTube video](https://www.youtube.com/watch?v=6c7pZYP_iIE) by
417
418
/// Logan Smith for an in-depth explanation of why this is important.
0 commit comments