treewide: remove dead code
Also deletes some dead_code annotations from functions that are *actually used*. Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ic815cacc93c464078ead1674e7523d8b6a6a6964
This commit is contained in:
parent
b0a594e892
commit
f4287de795
3 changed files with 30 additions and 112 deletions
|
|
@ -13,6 +13,7 @@ use crate::{
|
|||
|
||||
pub async fn execute(
|
||||
parallel: bool,
|
||||
skip_prompts: bool,
|
||||
lockfile_path: &Path,
|
||||
config_path: &Path,
|
||||
) -> Result<()> {
|
||||
|
|
@ -77,15 +78,15 @@ pub async fn execute(
|
|||
// Prompt to update if there are updates available
|
||||
if !updates.is_empty() {
|
||||
println!();
|
||||
if crate::ui_utils::prompt_yes_no("Update now?", false)? {
|
||||
if crate::ui_utils::prompt_yes_no("Update now?", false, skip_prompts)? {
|
||||
// Call update command programmatically (update all projects)
|
||||
let update_args = crate::cli::UpdateArgs {
|
||||
inputs: vec![],
|
||||
all: true,
|
||||
yes: true, // Auto-yes for status command
|
||||
};
|
||||
crate::cli::commands::update::execute(
|
||||
update_args,
|
||||
true, // Auto-yes for status command
|
||||
lockfile_path,
|
||||
config_path,
|
||||
)
|
||||
|
|
@ -380,17 +381,6 @@ fn display_update_results(updates: &[ProjectUpdate]) {
|
|||
);
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn get_project_display_name(project: &Project) -> String {
|
||||
project
|
||||
.name
|
||||
.values()
|
||||
.next()
|
||||
.or_else(|| project.slug.values().next())
|
||||
.cloned()
|
||||
.unwrap_or_else(|| "Unknown".to_string())
|
||||
}
|
||||
|
||||
fn get_api_key(platform: &str) -> Option<String> {
|
||||
match platform {
|
||||
"modrinth" => std::env::var("MODRINTH_TOKEN").ok(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue