Skip to content

Commit

Permalink
chore: remove .to_string() from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGimbel committed Apr 19, 2024
1 parent 3719869 commit 3a98db3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,16 @@ mod tests {

#[test]
fn test_gen_int() {
let mut res = gen_int("1,10".to_string()).parse::<i32>().unwrap();
let mut res = gen_int("1,10").parse::<i32>().unwrap();
assert_eq!(true, (res >= 1 && res <= 10));

res = gen_int("10,300".to_string()).parse::<i32>().unwrap();
res = gen_int("10,300").parse::<i32>().unwrap();
assert_eq!(true, (res >= 10 && res <= 300));

res = gen_int("300000,999999".to_string()).parse::<i32>().unwrap();
res = gen_int("300000,999999").parse::<i32>().unwrap();
assert_eq!(true, (res >= 300000 && res <= 999999));

res = gen_int("99999999,1000000000".to_string())
res = gen_int("99999999,1000000000")
.parse::<i32>()
.unwrap();
assert_eq!(true, (res >= 99999999 && res <= 1000000000));
Expand Down

0 comments on commit 3a98db3

Please sign in to comment.