Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix API breakage relating to lifetime tweaks and bitflags attributes #41

Merged
merged 2 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion alpm/src/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion alpm/src/trans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions alpm/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Loading