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::future::Future;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
use std::ops::ControlFlow;
|
||||||
use std::os::unix::ffi::{OsStrExt, OsStringExt};
|
use std::os::unix::ffi::{OsStrExt, OsStringExt};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
|
@ -20,7 +21,6 @@ use pxar::{EntryKind, Metadata};
|
||||||
|
|
||||||
use pbs_runtime::block_in_place;
|
use pbs_runtime::block_in_place;
|
||||||
use pbs_datastore::catalog::{self, DirEntryAttribute};
|
use pbs_datastore::catalog::{self, DirEntryAttribute};
|
||||||
use pbs_tools::ops::ControlFlow;
|
|
||||||
|
|
||||||
use crate::pxar::Flags;
|
use crate::pxar::Flags;
|
||||||
use crate::pxar::fuse::{Accessor, FileEntry};
|
use crate::pxar::fuse::{Accessor, FileEntry};
|
||||||
|
@ -1100,7 +1100,7 @@ impl<'a> ExtractorState<'a> {
|
||||||
|
|
||||||
self.extractor.leave_directory()?;
|
self.extractor.leave_directory()?;
|
||||||
|
|
||||||
Ok(ControlFlow::CONTINUE)
|
Ok(ControlFlow::Continue(()))
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_new_directory(
|
async fn handle_new_directory(
|
||||||
|
|
|
@ -15,7 +15,6 @@ pub mod json;
|
||||||
pub mod logrotate;
|
pub mod logrotate;
|
||||||
pub mod lru_cache;
|
pub mod lru_cache;
|
||||||
pub mod nom;
|
pub mod nom;
|
||||||
pub mod ops;
|
|
||||||
pub mod percent_encoding;
|
pub mod percent_encoding;
|
||||||
pub mod process_locker;
|
pub mod process_locker;
|
||||||
pub mod sha;
|
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::fs;
|
||||||
|
use std::ops::ControlFlow;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use std::time::SystemTime;
|
use std::time::SystemTime;
|
||||||
|
@ -17,7 +18,6 @@ use proxmox_acme_rs::account::AccountData as AcmeAccountData;
|
||||||
use proxmox_acme_rs::Account;
|
use proxmox_acme_rs::Account;
|
||||||
|
|
||||||
use pbs_api_types::{Authid, PRIV_SYS_MODIFY};
|
use pbs_api_types::{Authid, PRIV_SYS_MODIFY};
|
||||||
use pbs_tools::ops::ControlFlow;
|
|
||||||
use pbs_tools::{task_log, task_warn};
|
use pbs_tools::{task_log, task_warn};
|
||||||
|
|
||||||
use crate::acme::AcmeClient;
|
use crate::acme::AcmeClient;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use std::ops::ControlFlow;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use anyhow::{bail, format_err, Error};
|
use anyhow::{bail, format_err, Error};
|
||||||
|
@ -14,7 +15,6 @@ use crate::api2::types::{
|
||||||
KnownAcmeDirectory,
|
KnownAcmeDirectory,
|
||||||
AcmeAccountName,
|
AcmeAccountName,
|
||||||
};
|
};
|
||||||
use pbs_tools::ops::ControlFlow;
|
|
||||||
|
|
||||||
pub(crate) const ACME_DIR: &str = pbs_buildcfg::configdir!("/acme");
|
pub(crate) const ACME_DIR: &str = pbs_buildcfg::configdir!("/acme");
|
||||||
pub(crate) const ACME_ACCOUNT_DIR: &str = pbs_buildcfg::configdir!("/acme/accounts");
|
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 mut out = Vec::new();
|
||||||
let _ = foreach_acme_account(|name| {
|
let _ = foreach_acme_account(|name| {
|
||||||
out.push(name.into_string());
|
out.push(name.into_string());
|
||||||
ControlFlow::CONTINUE
|
ControlFlow::Continue(())
|
||||||
});
|
});
|
||||||
out
|
out
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue