remove the regex dependency as functionality is possible without it

This commit is contained in:
alpaylan
2024-12-26 15:20:19 -05:00
parent 7524cf052e
commit 12fee4df37
3 changed files with 3 additions and 6 deletions

1
Cargo.lock generated
View File

@@ -1175,7 +1175,6 @@ dependencies = [
"log",
"rand",
"rand_chacha",
"regex",
"tempfile",
]

View File

@@ -22,5 +22,4 @@ log = "0.4.20"
tempfile = "3.0.7"
env_logger = "0.10.1"
anarchist-readable-name-generator-lib = "0.1.2"
clap = { version = "4.5", features = ["derive"] }
regex = "1.10.5"
clap = { version = "4.5", features = ["derive"] }

View File

@@ -352,6 +352,7 @@ fn property_insert_select<R: rand::Rng>(rng: &mut R, env: &SimulatorEnv) -> Inte
fn property_double_create_failure<R: rand::Rng>(rng: &mut R, env: &SimulatorEnv) -> Interactions {
let create_query = Create::arbitrary(rng);
let table_name = create_query.table.name.clone();
let cq1 = Interaction::Query(Query::Create(create_query.clone()));
let cq2 = Interaction::Query(Query::Create(create_query.clone()));
@@ -361,12 +362,10 @@ fn property_double_create_failure<R: rand::Rng>(rng: &mut R, env: &SimulatorEnv)
.to_string(),
func: Box::new(move |stack: &Vec<ResultSet>| {
let last = stack.last().unwrap();
println!("last: {:?}", last);
match last {
Ok(_) => false,
Err(e) => {
let re = regex::Regex::new("Table .* already exists").unwrap();
re.is_match(&e.to_string())
e.to_string().contains(&format!("Table {table_name} already exists"))
}
}
}),