lang: deprecate ops::ControlFlow

as we now have rustc 1.55

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2021-10-12 13:34:57 +02:00
parent 4ccd6256a8
commit af33a97547

View File

@ -2,13 +2,16 @@
/// Modeled after the nightly `std::ops::ControlFlow`.
///
/// To be removed with rust 1.55.
/// Will be removed with crate version 2.0.
#[derive(Clone, Copy, Debug, PartialEq)]
#[deprecated(since = "1.1", note = "use std::ops::ControlFlow")]
pub enum ControlFlow<B, C = ()> {
Continue(C),
Break(B),
}
#[allow(deprecated)]
impl<B> ControlFlow<B> {
#[deprecated(since = "1.1", note = "use std::ops::ControlFlow")]
pub const CONTINUE: ControlFlow<B, ()> = ControlFlow::Continue(());
}