Skip to content

Commit

Permalink
Tiny cleanup in ViaVersion/ViaBackwards
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew121410 committed Aug 3, 2024
1 parent 7fca6eb commit df0cc82
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/controllers/viaversion/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@ impl platform::IPlatform for ViaVersionAPI {
}

fn get_download_link(&self, project: &String, _version: &String, _build: &String) -> String {
let mut fallback_channel = "".to_string();
if project.eq_ignore_ascii_case("viaversion") {
fallback_channel = "viaversion".to_string();
} else if project.eq_ignore_ascii_case("viabackwards") {
fallback_channel = "viabackwards".to_string();
}

let fallback_channel = fallback_channel(&project);
let channel_selected = controllers::clap_get_one_or_fallback(&"channel".to_string(), &fallback_channel);

// Check if the channel is valid
Expand Down Expand Up @@ -61,13 +55,7 @@ impl platform::IPlatform for ViaVersionAPI {
return None;
}

let mut fallback_channel = "".to_string();
if project.eq_ignore_ascii_case("viaversion") {
fallback_channel = "viaversion".to_string();
} else if project.eq_ignore_ascii_case("viabackwards") {
fallback_channel = "viabackwards".to_string();
}

let fallback_channel = fallback_channel(&project);
let channel_selected = controllers::clap_get_one_or_fallback(&"channel".to_string(), &fallback_channel);

// Check if the channel is valid
Expand Down

0 comments on commit df0cc82

Please sign in to comment.