Skip to content

Commit 87c02ba

Browse files
committed
fix type cast in mcvcli stop
1 parent 4913143 commit 87c02ba

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

Cargo.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "mcvcli"
33
description = "A command line interface for managing Minecraft servers."
4-
version = "2.2.4"
4+
version = "2.2.5"
55
edition = "2024"
66
license = "MIT"
77
homepage = "https://github.com/mcjars/mcvcli"

src/api/mcjars.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub struct McjarsApi {
6767
impl McjarsApi {
6868
pub fn new() -> Self {
6969
Self {
70-
url: std::env::var("MCJARS_URL").unwrap_or("https://versions.mcjars.app".to_string()),
70+
url: std::env::var("MCJARS_URL").unwrap_or("https://mcjars.app".to_string()),
7171
fields: "id,type,versionId,projectVersionId,name,installation,changes".to_string(),
7272
}
7373
}

src/commands/stop.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ use clap::ArgMatches;
44
use colored::Colorize;
55

66
pub async fn stop(matches: &ArgMatches) -> i32 {
7-
let timeout = matches.get_one::<String>("timeout").expect("required");
8-
let timeout = timeout
9-
.parse::<u64>()
10-
.expect("timeout must be a non-negative integer");
7+
let timeout = *matches.get_one::<u64>("timeout").expect("required");
118
let mut config = config::Config::new(".mcvcli.json", false);
129

1310
if !detached::status(config.pid) {

0 commit comments

Comments
 (0)