update to first proxmox crate split

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2021-10-08 11:19:37 +02:00
parent e3f3359c86
commit 6ef1b649d9
265 changed files with 880 additions and 1036 deletions

View File

@ -3,7 +3,7 @@ use std::convert::TryInto;
use anyhow::Error;
use bitflags::bitflags;
use proxmox::tools::time::TmEditor;
use proxmox_time::TmEditor;
pub use super::parse_time::*;
@ -368,7 +368,7 @@ mod test {
use anyhow::bail;
use super::*;
use proxmox::tools::time::*;
//use proxmox_time::*;
fn test_event(v: &'static str) -> Result<(), Error> {
match parse_calendar_event(v) {
@ -397,8 +397,12 @@ mod test {
if next == expect {
println!("next {:?} => {}", event, next);
} else {
bail!("next {:?} failed\nnext: {:?}\nexpect: {:?}",
event, gmtime(next), gmtime(expect));
bail!(
"next {:?} failed\nnext: {:?}\nexpect: {:?}",
event,
proxmox_time::gmtime(next),
proxmox_time::gmtime(expect),
);
}
}
Ok(None) => bail!("next {:?} failed to find a timestamp", event),

View File

@ -7,7 +7,7 @@ fn run_command(mut command: Command) -> Result<(), Error> {
.output()
.map_err(|err| format_err!("failed to execute {:?} - {}", command, err))?;
proxmox::try_block!({
proxmox_lang::try_block!({
if !output.status.success() {
match output.status.code() {
Some(code) => {