Remove redundant must_use
This commit is contained in:
@@ -79,7 +79,6 @@ impl Distribution {
|
||||
Err(TopgradeError::UnknownLinuxDistribution.into())
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn upgrade(self, sudo: &Option<PathBuf>, run_type: RunType, config: &Config) -> Result<()> {
|
||||
print_separator("System update");
|
||||
|
||||
@@ -399,7 +398,6 @@ pub fn run_needrestart(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()>
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn run_fwupdmgr(run_type: RunType) -> Result<()> {
|
||||
let fwupdmgr = require("fwupdmgr")?;
|
||||
|
||||
@@ -417,7 +415,6 @@ pub fn run_fwupdmgr(run_type: RunType) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn flatpak_update(run_type: RunType) -> Result<()> {
|
||||
let flatpak = require("flatpak")?;
|
||||
print_separator("Flatpak User Packages");
|
||||
@@ -432,7 +429,6 @@ pub fn flatpak_update(run_type: RunType) -> Result<()> {
|
||||
.check_run()
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn run_snap(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
|
||||
let sudo = require_option(sudo)?;
|
||||
let snap = require("snap")?;
|
||||
@@ -445,7 +441,6 @@ pub fn run_snap(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
|
||||
run_type.execute(sudo).arg(snap).arg("refresh").check_run()
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn run_rpi_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
|
||||
let sudo = require_option(sudo)?;
|
||||
let rpi_update = require("rpi-update")?;
|
||||
@@ -455,7 +450,6 @@ pub fn run_rpi_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
|
||||
run_type.execute(sudo).arg(rpi_update).check_run()
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn run_pihole_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
|
||||
let sudo = require_option(sudo)?;
|
||||
let pihole = require("pihole")?;
|
||||
@@ -465,7 +459,6 @@ pub fn run_pihole_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()
|
||||
run_type.execute(sudo).arg(pihole).arg("-up").check_run()
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn run_etc_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
|
||||
let sudo = require_option(sudo)?;
|
||||
let etc_update = require("etc-update")?;
|
||||
|
||||
@@ -2,7 +2,6 @@ use crate::executor::RunType;
|
||||
use crate::terminal::print_separator;
|
||||
use anyhow::Result;
|
||||
|
||||
#[must_use]
|
||||
pub fn upgrade_macos(run_type: RunType) -> Result<()> {
|
||||
print_separator("App Store");
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ pub fn run_fisher(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
||||
run_type.execute(&fish).args(&["-c", "fisher"]).check_run()
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn run_homebrew(cleanup: bool, run_type: RunType) -> Result<()> {
|
||||
let brew = require("brew")?;
|
||||
print_separator("Brew");
|
||||
@@ -51,7 +50,6 @@ pub fn run_homebrew(cleanup: bool, run_type: RunType) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn run_nix(run_type: RunType) -> Result<()> {
|
||||
let nix = require("nix")?;
|
||||
let nix_channel = require("nix-channel")?;
|
||||
|
||||
@@ -69,7 +69,6 @@ fn nvimrc(base_dirs: &BaseDirs) -> Option<PathBuf> {
|
||||
return base_dirs.cache_dir().join("nvim/init.vim").if_exists();
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
fn upgrade(
|
||||
vim: &PathBuf,
|
||||
vimrc: &PathBuf,
|
||||
@@ -106,7 +105,6 @@ fn upgrade(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn upgrade_vim(base_dirs: &BaseDirs, run_type: RunType, cleanup: bool) -> Result<()> {
|
||||
let vim = require("vim")?;
|
||||
|
||||
@@ -122,7 +120,6 @@ pub fn upgrade_vim(base_dirs: &BaseDirs, run_type: RunType, cleanup: bool) -> Re
|
||||
upgrade(&vim, &vimrc, plugin_framework, run_type, cleanup)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn upgrade_neovim(base_dirs: &BaseDirs, run_type: RunType, cleanup: bool) -> Result<()> {
|
||||
let nvim = require("nvim")?;
|
||||
let nvimrc = require_option(nvimrc(&base_dirs))?;
|
||||
|
||||
Reference in New Issue
Block a user