From 3ea7960116e438fb3dae6b1284af244b8b99b38b Mon Sep 17 00:00:00 2001 From: JacobLinCool Date: Tue, 16 May 2023 23:40:42 +0800 Subject: [PATCH] feat: remove upper memory limit in cli --- src/cli.rs | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index eb6f825..70cb522 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -18,7 +18,7 @@ pub fn cli() -> Command { .args(&[ arg!(-m --memory "memory limit in MB") .default_value("512") - .value_parser(value_parser!(u32).range(1..=4096)), + .value_parser(value_parser!(u32).range(1..)), arg!(-c --cost "computational cost limit in instruction count") .default_value("1000000000") .value_parser(value_parser!(u64).range(1..)), diff --git a/src/main.rs b/src/main.rs index 73fe089..767ee1f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,7 +22,7 @@ async fn main() { Some(("run", args)) => { let mem: u32 = *args .get_one("memory") - .expect("memory limit should be in range 1..=4096"); + .expect("memory limit should be in range 1.."); let cost: u64 = *args .get_one("cost") .expect("cost limit should be in range 1..");