Fix elided lifetimes
This commit is contained in:
parent
3f4b842e14
commit
7745598117
7 changed files with 12 additions and 12 deletions
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue