“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.
This commit is contained in:
parent
226e181b80
commit
34c1fce50b
1 changed files with 1 additions and 1 deletions
|
@ -1701,7 +1701,7 @@ impl<'a, T> IntoIterator for &'a mut Option<T> {
|
|||
|
||||
#[stable(since = "1.12.0", feature = "option_from")]
|
||||
impl<T> From<T> for Option<T> {
|
||||
/// Copies `val` into a new `Some`.
|
||||
/// Moves `val` into a new [`Some`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue