diff --git a/pbs-buildcfg/src/lib.rs b/pbs-buildcfg/src/lib.rs index c1cd05b3..75c2e27f 100644 --- a/pbs-buildcfg/src/lib.rs +++ b/pbs-buildcfg/src/lib.rs @@ -56,7 +56,7 @@ pub const PROXMOX_BACKUP_KERNEL_FN: &str = /// This is a simply way to get the full path for configuration files. /// #### Example: /// ``` -/// # #[macro_use] extern crate proxmox_backup; +/// use pbs_buildcfg::configdir; /// let cert_path = configdir!("/proxy.pfx"); /// ``` #[macro_export] diff --git a/pbs-datastore/src/manifest.rs b/pbs-datastore/src/manifest.rs index 4c6d5137..1f8d49f4 100644 --- a/pbs-datastore/src/manifest.rs +++ b/pbs-datastore/src/manifest.rs @@ -278,7 +278,7 @@ impl TryFrom for BackupManifest { #[test] fn test_manifest_signature() -> Result<(), Error> { - use crate::backup::{KeyDerivationConfig}; + use crate::{KeyDerivationConfig}; let pw = b"test"; diff --git a/pbs-systemd/src/time.rs b/pbs-systemd/src/time.rs index cbcb23df..7cf2e29f 100644 --- a/pbs-systemd/src/time.rs +++ b/pbs-systemd/src/time.rs @@ -379,8 +379,8 @@ mod test { Ok(()) } - const fn make_test_time(mday: i32, hour: i32, min: i32) -> libc::time_t { - (mday*3600*24 + hour*3600 + min*60) as libc::time_t + const fn make_test_time(mday: i32, hour: i32, min: i32) -> i64 { + (mday*3600*24 + hour*3600 + min*60) as i64 } #[test] diff --git a/src/tools/file_logger.rs b/src/tools/file_logger.rs index 556a70a0..611a7e4d 100644 --- a/src/tools/file_logger.rs +++ b/src/tools/file_logger.rs @@ -8,8 +8,8 @@ use std::io::Write; /// /// #### Example: /// ``` -/// #[macro_use] extern crate proxmox_backup; /// # use anyhow::{bail, format_err, Error}; +/// use proxmox_backup::flog; /// use proxmox_backup::tools::{FileLogger, FileLogOptions}; /// /// # std::fs::remove_file("test.log");