remove pbs-tools::ops::ControlFlow
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
27709b49d5
commit
890b88cbef
@ -3,6 +3,7 @@ use std::ffi::{CStr, CString, OsStr, OsString};
|
||||
use std::future::Future;
|
||||
use std::io::Write;
|
||||
use std::mem;
|
||||
use std::ops::ControlFlow;
|
||||
use std::os::unix::ffi::{OsStrExt, OsStringExt};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::pin::Pin;
|
||||
@ -20,7 +21,6 @@ use pxar::{EntryKind, Metadata};
|
||||
|
||||
use pbs_runtime::block_in_place;
|
||||
use pbs_datastore::catalog::{self, DirEntryAttribute};
|
||||
use pbs_tools::ops::ControlFlow;
|
||||
|
||||
use crate::pxar::Flags;
|
||||
use crate::pxar::fuse::{Accessor, FileEntry};
|
||||
@ -1100,7 +1100,7 @@ impl<'a> ExtractorState<'a> {
|
||||
|
||||
self.extractor.leave_directory()?;
|
||||
|
||||
Ok(ControlFlow::CONTINUE)
|
||||
Ok(ControlFlow::Continue(()))
|
||||
}
|
||||
|
||||
async fn handle_new_directory(
|
||||
|
@ -15,7 +15,6 @@ pub mod json;
|
||||
pub mod logrotate;
|
||||
pub mod lru_cache;
|
||||
pub mod nom;
|
||||
pub mod ops;
|
||||
pub mod percent_encoding;
|
||||
pub mod process_locker;
|
||||
pub mod sha;
|
||||
|
@ -1,12 +0,0 @@
|
||||
//! std::ops extensions
|
||||
|
||||
/// Modeled after the nightly `std::ops::ControlFlow`.
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ControlFlow<B, C = ()> {
|
||||
Continue(C),
|
||||
Break(B),
|
||||
}
|
||||
|
||||
impl<B> ControlFlow<B> {
|
||||
pub const CONTINUE: ControlFlow<B, ()> = ControlFlow::Continue(());
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
use std::fs;
|
||||
use std::ops::ControlFlow;
|
||||
use std::path::Path;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::time::SystemTime;
|
||||
@ -17,7 +18,6 @@ use proxmox_acme_rs::account::AccountData as AcmeAccountData;
|
||||
use proxmox_acme_rs::Account;
|
||||
|
||||
use pbs_api_types::{Authid, PRIV_SYS_MODIFY};
|
||||
use pbs_tools::ops::ControlFlow;
|
||||
use pbs_tools::{task_log, task_warn};
|
||||
|
||||
use crate::acme::AcmeClient;
|
||||
|
@ -1,4 +1,5 @@
|
||||
use std::collections::HashMap;
|
||||
use std::ops::ControlFlow;
|
||||
use std::path::Path;
|
||||
|
||||
use anyhow::{bail, format_err, Error};
|
||||
@ -14,7 +15,6 @@ use crate::api2::types::{
|
||||
KnownAcmeDirectory,
|
||||
AcmeAccountName,
|
||||
};
|
||||
use pbs_tools::ops::ControlFlow;
|
||||
|
||||
pub(crate) const ACME_DIR: &str = pbs_buildcfg::configdir!("/acme");
|
||||
pub(crate) const ACME_ACCOUNT_DIR: &str = pbs_buildcfg::configdir!("/acme/accounts");
|
||||
@ -141,7 +141,7 @@ pub fn complete_acme_account(_arg: &str, _param: &HashMap<String, String>) -> Ve
|
||||
let mut out = Vec::new();
|
||||
let _ = foreach_acme_account(|name| {
|
||||
out.push(name.into_string());
|
||||
ControlFlow::CONTINUE
|
||||
ControlFlow::Continue(())
|
||||
});
|
||||
out
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user