solar-core 1.0.1

Core library for cargo-solar command.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use clap::Parser;

use crate::{Action, SolarError, Tool};

#[derive(Parser, Clone)]
pub struct Upgrade {
    /// The name of the tool to upgrade. If none is provided, defaults to all tools.
    #[command(subcommand)]
    tool: Tool,
}

impl Upgrade {
    pub fn run(&mut self) -> Result<(), SolarError> {
        self.tool.act(&Action::UPGRADE, None)
    }
}