Skip to content
Open
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
4 changes: 2 additions & 2 deletions alpm/src/conflict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ impl FileConflict {
unsafe { from_cstr((*self.as_ptr()).file) }
}

// TODO: target is "" when empty. should be null instead.
// TODO: ctarget is "" when empty. should be null instead.
pub fn conflicting_target(&self) -> Option<&str> {
let s = unsafe { from_cstr((*self.as_ptr()).target) };
let s = unsafe { from_cstr((*self.as_ptr()).ctarget) };

if s.is_empty() { None } else { Some(s) }
}
Expand Down
12 changes: 6 additions & 6 deletions alpm/src/trans.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
Alpm, AlpmList, AlpmListMut, Conflict, DepMissing, DependMissing, Error, OwnedConflict,
OwnedFileConflict, Package, Result,
Alpm, AlpmList, AlpmListMut, Conflict, DepMissing, DependMissing, Error, FileConflict,
OwnedConflict, OwnedFileConflict, Package, Result,
};

use alpm_sys::_alpm_transflag_t::*;
Expand Down Expand Up @@ -37,8 +37,8 @@ bitflags! {
}

#[derive(Debug)]
pub enum PrepareData<'a, 'h> {
PkgInvalidArch(AlpmList<'a, &'h Package>),
pub enum PrepareData<'a> {
PkgInvalidArch(AlpmList<'a, &'a str>),
UnsatisfiedDeps(AlpmList<'a, &'a DepMissing>),
ConflictingDeps(AlpmList<'a, &'a Conflict>),
}
Expand Down Expand Up @@ -94,7 +94,7 @@ impl<'h> PrepareError<'h> {
self.error
}

pub fn data<'a>(&'a self) -> Option<PrepareData<'a, 'h>> {
pub fn data<'a>(&'a self) -> Option<PrepareData<'a>> {
match self.error {
Error::PkgInvalidArch => unsafe {
let list = AlpmList::from_ptr(self.data);
Expand All @@ -115,7 +115,7 @@ impl<'h> PrepareError<'h> {

#[derive(Debug)]
pub enum CommitData<'a> {
FileConflict(AlpmList<'a, &'a Conflict>),
FileConflict(AlpmList<'a, &'a FileConflict>),
PkgInvalid(AlpmList<'a, &'a str>),
}

Expand Down