Skip to content

Commit 41a3385

Browse files
committed
Auto merge of #30298 - Letheed:docpatch, r=sanxiyn
Missing Panics tag and missing period in the documentation of `fn expect(…)` for `Option` and `Result`.
2 parents ae1cf98 + af4414b commit 41a3385

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/libcore/option.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ impl<T> Option<T> {
309309
// Getting to contained values
310310
/////////////////////////////////////////////////////////////////////////
311311

312-
/// Unwraps an option, yielding the content of a `Some`
312+
/// Unwraps an option, yielding the content of a `Some`.
313313
///
314314
/// # Panics
315315
///

src/libcore/result.rs

+2
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,8 @@ impl<T, E: fmt::Debug> Result<T, E> {
744744

745745
/// Unwraps a result, yielding the content of an `Ok`.
746746
///
747+
/// # Panics
748+
///
747749
/// Panics if the value is an `Err`, with a panic message including the
748750
/// passed message, and the content of the `Err`.
749751
///

0 commit comments

Comments
 (0)