File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 171
171
//! [`is_some_and`]: Option::is_some_and
172
172
//! [`is_none_or`]: Option::is_none_or
173
173
//!
174
+ //! ## Inspecting the variant
175
+ //!
176
+ //! The [`inspect`] method takes ownership of the [`Option`]
177
+ //! and applies the provided function to the contained value by reference if [`Some`]
178
+ //!
179
+ //! [`inspect`]: Option::inspect
180
+ //!
174
181
//! ## Adapters for working with references
175
182
//!
176
183
//! * [`as_ref`] converts from <code>[&][][Option]\<T></code> to <code>[Option]<[&]T></code>
248
255
//! if the function returns `true`; otherwise, returns [`None`]
249
256
//! * [`flatten`] removes one level of nesting from an
250
257
//! [`Option<Option<T>>`]
251
- //! * [`insert`] calls the provided function with a reference to
252
- //! the contained value if [`Some`]
253
258
//! * [`map`] transforms [`Option<T>`] to [`Option<U>`] by applying the
254
259
//! provided function to the contained value of [`Some`] and leaving
255
260
//! [`None`] values unchanged
256
261
//!
257
262
//! [`Some(t)`]: Some
258
263
//! [`filter`]: Option::filter
259
264
//! [`flatten`]: Option::flatten
260
- //! [`insert`]: Option::insert
261
265
//! [`map`]: Option::map
262
266
//!
263
267
//! These methods transform [`Option<T>`] to a value of a possibly
You can’t perform that action at this time.
0 commit comments