There is Ok(_)
and there is Err(_)
from Result
.
Why are the ControlFlow
variants Continue
and Break
not available to use anywhere like Ok
and Err
are?
There is Ok(_)
and there is Err(_)
from Result
.
Why are the ControlFlow
variants Continue
and Break
not available to use anywhere like Ok
and Err
are?
use std::ops::ControlFlow::{
self,
Break,
Continue,
};
helps
To answer the other direction of the question from the previous answer, the reason Ok
and Err
are available un-prefixed is that they're in the prelude: https://doc.rust-lang.org/std/prelude/v1/index.html#reexport.Ok