Remove redundant must_use

This commit is contained in:
Roey Darwish Dror
2019-12-21 15:32:58 +02:00
parent 6b5da066f6
commit 7f92b56fa8
4 changed files with 0 additions and 13 deletions

View File

@@ -79,7 +79,6 @@ impl Distribution {
Err(TopgradeError::UnknownLinuxDistribution.into()) Err(TopgradeError::UnknownLinuxDistribution.into())
} }
#[must_use]
pub fn upgrade(self, sudo: &Option<PathBuf>, run_type: RunType, config: &Config) -> Result<()> { pub fn upgrade(self, sudo: &Option<PathBuf>, run_type: RunType, config: &Config) -> Result<()> {
print_separator("System update"); print_separator("System update");
@@ -399,7 +398,6 @@ pub fn run_needrestart(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()>
Ok(()) Ok(())
} }
#[must_use]
pub fn run_fwupdmgr(run_type: RunType) -> Result<()> { pub fn run_fwupdmgr(run_type: RunType) -> Result<()> {
let fwupdmgr = require("fwupdmgr")?; let fwupdmgr = require("fwupdmgr")?;
@@ -417,7 +415,6 @@ pub fn run_fwupdmgr(run_type: RunType) -> Result<()> {
Ok(()) Ok(())
} }
#[must_use]
pub fn flatpak_update(run_type: RunType) -> Result<()> { pub fn flatpak_update(run_type: RunType) -> Result<()> {
let flatpak = require("flatpak")?; let flatpak = require("flatpak")?;
print_separator("Flatpak User Packages"); print_separator("Flatpak User Packages");
@@ -432,7 +429,6 @@ pub fn flatpak_update(run_type: RunType) -> Result<()> {
.check_run() .check_run()
} }
#[must_use]
pub fn run_snap(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> { pub fn run_snap(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
let sudo = require_option(sudo)?; let sudo = require_option(sudo)?;
let snap = require("snap")?; 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() run_type.execute(sudo).arg(snap).arg("refresh").check_run()
} }
#[must_use]
pub fn run_rpi_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> { pub fn run_rpi_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
let sudo = require_option(sudo)?; let sudo = require_option(sudo)?;
let rpi_update = require("rpi-update")?; 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() run_type.execute(sudo).arg(rpi_update).check_run()
} }
#[must_use]
pub fn run_pihole_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> { pub fn run_pihole_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
let sudo = require_option(sudo)?; let sudo = require_option(sudo)?;
let pihole = require("pihole")?; 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() run_type.execute(sudo).arg(pihole).arg("-up").check_run()
} }
#[must_use]
pub fn run_etc_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> { pub fn run_etc_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
let sudo = require_option(sudo)?; let sudo = require_option(sudo)?;
let etc_update = require("etc-update")?; let etc_update = require("etc-update")?;

View File

@@ -2,7 +2,6 @@ use crate::executor::RunType;
use crate::terminal::print_separator; use crate::terminal::print_separator;
use anyhow::Result; use anyhow::Result;
#[must_use]
pub fn upgrade_macos(run_type: RunType) -> Result<()> { pub fn upgrade_macos(run_type: RunType) -> Result<()> {
print_separator("App Store"); print_separator("App Store");

View File

@@ -25,7 +25,6 @@ pub fn run_fisher(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
run_type.execute(&fish).args(&["-c", "fisher"]).check_run() run_type.execute(&fish).args(&["-c", "fisher"]).check_run()
} }
#[must_use]
pub fn run_homebrew(cleanup: bool, run_type: RunType) -> Result<()> { pub fn run_homebrew(cleanup: bool, run_type: RunType) -> Result<()> {
let brew = require("brew")?; let brew = require("brew")?;
print_separator("Brew"); print_separator("Brew");
@@ -51,7 +50,6 @@ pub fn run_homebrew(cleanup: bool, run_type: RunType) -> Result<()> {
Ok(()) Ok(())
} }
#[must_use]
pub fn run_nix(run_type: RunType) -> Result<()> { pub fn run_nix(run_type: RunType) -> Result<()> {
let nix = require("nix")?; let nix = require("nix")?;
let nix_channel = require("nix-channel")?; let nix_channel = require("nix-channel")?;

View File

@@ -69,7 +69,6 @@ fn nvimrc(base_dirs: &BaseDirs) -> Option<PathBuf> {
return base_dirs.cache_dir().join("nvim/init.vim").if_exists(); return base_dirs.cache_dir().join("nvim/init.vim").if_exists();
} }
#[must_use]
fn upgrade( fn upgrade(
vim: &PathBuf, vim: &PathBuf,
vimrc: &PathBuf, vimrc: &PathBuf,
@@ -106,7 +105,6 @@ fn upgrade(
Ok(()) Ok(())
} }
#[must_use]
pub fn upgrade_vim(base_dirs: &BaseDirs, run_type: RunType, cleanup: bool) -> Result<()> { pub fn upgrade_vim(base_dirs: &BaseDirs, run_type: RunType, cleanup: bool) -> Result<()> {
let vim = require("vim")?; 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) upgrade(&vim, &vimrc, plugin_framework, run_type, cleanup)
} }
#[must_use]
pub fn upgrade_neovim(base_dirs: &BaseDirs, run_type: RunType, cleanup: bool) -> Result<()> { pub fn upgrade_neovim(base_dirs: &BaseDirs, run_type: RunType, cleanup: bool) -> Result<()> {
let nvim = require("nvim")?; let nvim = require("nvim")?;
let nvimrc = require_option(nvimrc(&base_dirs))?; let nvimrc = require_option(nvimrc(&base_dirs))?;