Closed
Description
Let's say that I have the following code:
use mongodb::sync::Client;
let cli = Client::with_uri_str("mongodb://localhost:21017/test_db").unwrap();
It's good that we can fetch default database like this:
assert_eq!(cli.get_default_databse(), Some("test_db"));
If I have the following code:
use mongodb::sync::Client;
let cli = Client::with_uri_str("mongodb://localhost:21017/").unwrap();
then cli.get_default_database
can return None.
Connection string reference: https://docs.mongodb.com/manual/reference/connection-string/