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 171171//! [`is_some_and`]: Option::is_some_and
172172//! [`is_none_or`]: Option::is_none_or
173173//!
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+ //!
174181//! ## Adapters for working with references
175182//!
176183//! * [`as_ref`] converts from <code>[&][][Option]\<T></code> to <code>[Option]<[&]T></code>
248255//! if the function returns `true`; otherwise, returns [`None`]
249256//! * [`flatten`] removes one level of nesting from an
250257//! [`Option<Option<T>>`]
251- //! * [`insert`] calls the provided function with a reference to
252- //! the contained value if [`Some`]
253258//! * [`map`] transforms [`Option<T>`] to [`Option<U>`] by applying the
254259//! provided function to the contained value of [`Some`] and leaving
255260//! [`None`] values unchanged
256261//!
257262//! [`Some(t)`]: Some
258263//! [`filter`]: Option::filter
259264//! [`flatten`]: Option::flatten
260- //! [`insert`]: Option::insert
261265//! [`map`]: Option::map
262266//!
263267//! These methods transform [`Option<T>`] to a value of a possibly
You can’t perform that action at this time.
0 commit comments