Fix elided lifetimes
All checks were successful
Build / Check format (push) Successful in 50s
Build / Lint pacwrap (push) Successful in 1m23s
Build / Build pacwrap (push) Successful in 1m35s

This commit is contained in:
Xavier Moffett 2024-12-18 19:42:10 -05:00
parent 3f4b842e14
commit 7745598117
Signed by: Sapphirus
GPG key ID: A6C061B2CEA1A7AC
7 changed files with 12 additions and 12 deletions

View file

@ -35,7 +35,7 @@ pub struct ContainerCache<'a> {
instances: IndexMap<&'a str, ContainerHandle<'a>>,
}
impl<'a> Default for ContainerCache<'a> {
impl Default for ContainerCache<'_> {
fn default() -> Self {
Self::new()
}

View file

@ -143,7 +143,7 @@ impl<'a> ContainerHandle<'a> {
}
}
impl<'a> Debug for ContainerHandle<'a> {
impl Debug for ContainerHandle<'_> {
fn fmt(&self, fmter: &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
write!(fmter, "{:?}", self.vars())?;
write!(fmter, "{:?}", self.config())

View file

@ -286,7 +286,7 @@ impl Default for SummaryKind {
}
impl TableColumns {
fn header<'a>(&'a self, preface: &'a str) -> Vec<&str> {
fn header<'a>(&self, preface: &'a str) -> Vec<&'a str> {
match self {
Self::OldNewNetDownload => vec![preface, "Old Version", "New Version", "Net Change", "Download Size"],
Self::NewNetDownload => vec![preface, "New Version", "Net Change", "Download Size"],

View file

@ -231,7 +231,7 @@ impl TransactionType {
}
impl<'a> TransactionMetadata<'a> {
fn new(queue: Vec<&'a str>) -> TransactionMetadata {
fn new(queue: Vec<&'a str>) -> TransactionMetadata<'a> {
Self {
foreign_pkgs: HashSet::new(),
resident_pkgs: HashSet::new(),

View file

@ -67,7 +67,7 @@ impl Display for InvalidArgument {
}
}
impl<'a> Default for Arguments<'a> {
impl Default for Arguments<'_> {
fn default() -> Self {
Self::new()
}
@ -181,7 +181,7 @@ impl<'a> Iterator for Arguments<'a> {
}
}
impl<'a> Display for Operand<'a> {
impl Display for Operand<'_> {
fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Operand::Long(str) => write!(fmt, "--{}", str),
@ -195,13 +195,13 @@ impl<'a> Display for Operand<'a> {
}
}
impl<'a> Default for &Operand<'a> {
impl Default for &Operand<'_> {
fn default() -> Self {
&Operand::Nothing
}
}
impl<'a> Default for Operand<'a> {
impl Default for Operand<'_> {
fn default() -> Self {
Self::Nothing
}

View file

@ -83,7 +83,7 @@ pub struct Table<'a> {
built: bool,
}
impl<'a> Default for Table<'a> {
impl Default for Table<'_> {
fn default() -> Self {
Self::new()
}
@ -157,7 +157,7 @@ impl<'a> Table<'a> {
!self.marker.is_empty()
}
pub fn build(&'a mut self) -> Result<&Self, Error> {
pub fn build(&'a mut self) -> Result<&'a Self, Error> {
if let (0, 0) = self.dimensions {
err!(TableError::Empty)?
} else if let (_, 0) = self.dimensions {
@ -251,7 +251,7 @@ impl<'a> Entry<'a> {
}
}
impl<'a> Display for Table<'a> {
impl Display for Table<'_> {
fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), FmtError> {
if !self.built {
return writeln!(fmt, "Table object not built");

View file

@ -68,7 +68,7 @@ impl<'a> FileType<'a> {
}
}
impl<'a> Display for FileType<'a> {
impl Display for FileType<'_> {
fn fmt(&self, fmt: &mut Formatter<'_>) -> FmtResult {
match self {
FileType::LogFile => write!(fmt, "{}/pacwrap.log", *DATA_DIR),