Skip to content

Commit 34c1fce

Browse files
committed
“Moves” instead of “copies” in <Option<T> as From<T>>::from doc.
This implementation has no `Copy` or `Clone` bound, so its operation is guaranteed to be a move. The call site might copy, but the function itself cannot. Also linkify `Some` while we're touching the line anyway.
1 parent 226e181 commit 34c1fce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/option.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1701,7 +1701,7 @@ impl<'a, T> IntoIterator for &'a mut Option<T> {
17011701

17021702
#[stable(since = "1.12.0", feature = "option_from")]
17031703
impl<T> From<T> for Option<T> {
1704-
/// Copies `val` into a new `Some`.
1704+
/// Moves `val` into a new [`Some`].
17051705
///
17061706
/// # Examples
17071707
///

0 commit comments

Comments
 (0)