Rust mysql pool constructor

Why does this code not work:

use super::*;

use mysql;

fn test_00() {
    let pool = mysql::Pool::new(mysql::Opts::from(

OptsBuilder::new() has .ip_or_hostname, .user, and .pass

Furthermore, Opts implments From<OptsBuilder>

What am I doing wrong?

Hmm, apparently the solution is:

    let mut builder = OptsBuilder::new();

    let pool = Pool::new(builder).unwrap();

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.