Skip to content

Commit 38295a0

Browse files
committed
update docs
1 parent 73a16c1 commit 38295a0

File tree

1 file changed

+3
-2
lines changed
  • clippy_lints/src/functions

1 file changed

+3
-2
lines changed

clippy_lints/src/functions/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)