got it to compile

This commit is contained in:
William Ball 2022-01-26 16:36:28 -05:00
parent cc25ea91b6
commit 43cd634c68
2 changed files with 5 additions and 5 deletions

View file

@ -2,10 +2,10 @@
name = "insert_digit_anywhere_primes_constant"
version = "0.1.0"
authors = ["William Ball <wball1@swarthmore.edu>"]
edition = "2018"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
is_prime = "1.0.5"
rand = "0.7.3"
is_prime = "2.0.7"
rand = "*"

View file

@ -1,4 +1,4 @@
use is_prime::is_prime_with_witnesses;
use is_prime::is_prime;
use rand::prelude::*;
use std::io::prelude::*;
@ -14,7 +14,7 @@ fn step(x: String, rng: &mut ThreadRng) -> Option<String> {
let mut copy = x.clone();
copy.insert(i, (d + '0' as u8) as char);
if copy.as_bytes()[0] != '0' as u8 {
if is_prime_with_witnesses(&copy, 40) {
if is_prime(&copy) {
return Some(copy);
}
}