You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mongo-rust-driver/tests/helpers/mod.rs

9 lines
234 B
Rust

use std::env;
pub fn mongodb_test_connection_string() -> &'static str {
match env::var("MONGODB_CONNECTION_STRING") {
Ok(value) => Box::leak(value.into_boxed_str()),
Err(_) => "mongodb://localhost:27017",
}
}