Update README.md (fix
@@ -50,8 +50,11 @@ struct Payment {
account_name: Option<String>,
}
-let url = "mysql://root:password@localhost:3307/db_name";
+fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
+ let url = "mysql://root:password@localhost:3307/db_name";
+ # Opts::try_from(url)?;
+ # let url = get_opts();
let pool = Pool::new(url)?;
let mut conn = pool.get_conn()?;
@@ -97,6 +100,9 @@ let selected_payments = conn
// without `ORDER BY`, so assume we are lucky.
assert_eq!(payments, selected_payments);
println!("Yay!");
+
+ Ok(())
+}
```
### Crate Features
