diff --git a/alpm/src/remove.rs b/alpm/src/remove.rs index 801edca..7246265 100644 --- a/alpm/src/remove.rs +++ b/alpm/src/remove.rs @@ -3,7 +3,7 @@ use crate::{Alpm, Package, Result}; use alpm_sys::*; impl Alpm { - pub fn trans_remove_pkg(&self, pkg: Package) -> Result<()> { + pub fn trans_remove_pkg(&self, pkg: &Package) -> Result<()> { let ret = unsafe { alpm_remove_pkg(self.as_ptr(), pkg.as_ptr()) }; self.check_ret(ret) } diff --git a/alpm/src/trans.rs b/alpm/src/trans.rs index ea46eff..1eab7d4 100644 --- a/alpm/src/trans.rs +++ b/alpm/src/trans.rs @@ -12,7 +12,7 @@ use std::ptr; use bitflags::bitflags; bitflags! { - #[derive(Debug, PartialEq, Eq)] + #[derive(Debug, PartialEq, Eq, Copy, Clone)] pub struct TransFlag: u32 { const NONE = 0; const NO_DEPS = ALPM_TRANS_FLAG_NODEPS; diff --git a/alpm/src/types.rs b/alpm/src/types.rs index 96cd0c5..06f1ae8 100644 --- a/alpm/src/types.rs +++ b/alpm/src/types.rs @@ -35,7 +35,7 @@ pub enum FetchResult { } bitflags! { - #[derive(Debug, PartialEq, Eq)] + #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct SigLevel: u32 { const NONE = 0; const PACKAGE = ALPM_SIG_PACKAGE; @@ -51,7 +51,7 @@ bitflags! { } bitflags! { - #[derive(Debug, PartialEq, Eq)] + #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct Usage: u32 { const NONE = 0; const SYNC = ALPM_DB_USAGE_SYNC; @@ -63,7 +63,7 @@ bitflags! { } bitflags! { - #[derive(Debug, PartialEq, Eq)] + #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct LogLevel: u32 { const NONE = 0; const ERROR = ALPM_LOG_ERROR; @@ -104,7 +104,7 @@ pub enum PackageReason { } bitflags! { - #[derive(Debug, PartialEq, Eq)] + #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct PackageValidation: u32 { const UNKNOWN = ALPM_PKG_VALIDATION_UNKNOWN; const NONE = ALPM_PKG_VALIDATION_NONE;