mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 12:04:21 +01:00
remove the regex dependency as functionality is possible without it
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -1175,7 +1175,6 @@ dependencies = [
|
||||
"log",
|
||||
"rand",
|
||||
"rand_chacha",
|
||||
"regex",
|
||||
"tempfile",
|
||||
]
|
||||
|
||||
|
||||
@@ -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"] }
|
||||
@@ -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"))
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user