File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
clippy_lints/src/functions Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -410,8 +410,9 @@ declare_clippy_lint! {
410410 /// `&Option<T>` in a function signature breaks encapsulation because the caller must own T
411411 /// and move it into an Option to call with it. When returned, the owner must internally store
412412 /// 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.
415416 ///
416417 /// See this [YouTube video](https://www.youtube.com/watch?v=6c7pZYP_iIE) by
417418 /// Logan Smith for an in-depth explanation of why this is important.
You can’t perform that action at this time.
0 commit comments