Skip to content

Commit

Permalink
Merge pull request #1984 from tottoto/remove-needless-lifetime
Browse files Browse the repository at this point in the history
chore: remove needless lifetime
  • Loading branch information
chriskrycho authored Dec 31, 2024
2 parents 5dcad0c + 40bbba4 commit 43968e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/volta-core/src/platform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl<T> Sourced<T> {
}
}

impl<'a, T> Sourced<&'a T>
impl<T> Sourced<&T>
where
T: Clone,
{
Expand Down
10 changes: 5 additions & 5 deletions crates/volta-core/src/run/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ pub enum GlobalCommand<'a> {
Upgrade(UpgradeArgs<'a>),
}

impl<'a> GlobalCommand<'a> {
impl GlobalCommand<'_> {
pub fn executor(self, platform: &PlatformSpec) -> Fallible<Executor> {
match self {
GlobalCommand::Install(cmd) => cmd.executor(platform),
Expand All @@ -294,7 +294,7 @@ pub struct InstallArgs<'a> {
tools: Vec<&'a OsStr>,
}

impl<'a> InstallArgs<'a> {
impl InstallArgs<'_> {
/// Convert these global install arguments into an executor for the command
///
/// If there are multiple packages specified to install, then they will be broken out into
Expand Down Expand Up @@ -329,7 +329,7 @@ pub struct UninstallArgs<'a> {
tools: Vec<&'a OsStr>,
}

impl<'a> UninstallArgs<'a> {
impl UninstallArgs<'_> {
/// Convert the tools into an executor for the uninstall command
///
/// Since the packages are sandboxed, each needs to be uninstalled separately
Expand All @@ -355,7 +355,7 @@ pub struct UpgradeArgs<'a> {
tools: Vec<&'a OsStr>,
}

impl<'a> UpgradeArgs<'a> {
impl UpgradeArgs<'_> {
/// Convert these global upgrade arguments into an executor for the command
///
/// If there are multiple packages specified to upgrade, then they will be broken out into
Expand Down Expand Up @@ -428,7 +428,7 @@ pub struct LinkArgs<'a> {
tools: Vec<&'a OsStr>,
}

impl<'a> LinkArgs<'a> {
impl LinkArgs<'_> {
pub fn executor(self, platform: Platform, project_name: Option<String>) -> Fallible<Executor> {
if self.tools.is_empty() {
// If no tools are specified, then this is a bare link command, linking the current
Expand Down
2 changes: 1 addition & 1 deletion crates/volta-core/src/version/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub mod version_serde {

struct VersionVisitor;

impl<'de> Visitor<'de> for VersionVisitor {
impl Visitor<'_> for VersionVisitor {
type Value = Version;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down

0 comments on commit 43968e0

Please sign in to comment.