We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02f5786 commit 24c1b73Copy full SHA for 24c1b73
src/libstd/process.rs
@@ -1625,6 +1625,16 @@ impl<E: fmt::Debug> Termination for Result<(), E> {
1625
}
1626
1627
1628
+#[unstable(feature = "termination_trait_lib", issue = "43301")]
1629
+impl<T: Termination> Termination for Option<T> {
1630
+ fn report(self) -> i32 {
1631
+ match self {
1632
+ Some(v) => v.report(),
1633
+ None => 1,
1634
+ }
1635
1636
+}
1637
+
1638
#[unstable(feature = "termination_trait_lib", issue = "43301")]
1639
impl Termination for ! {
1640
fn report(self) -> i32 { self }
0 commit comments