In this case Error:
extern crate postgres;
use postgres::{Connection, SslMode};
pub fn test_pg(){
let conn =
Connection::connect(
"postgres://postgres:postgres@localhost/",
&SslMode::None)
.unwrap();
}
src\storage.rs:4:16: 4:24 error: unresolved import postgres::Connection
. Did you mean self::postgres
? [E0432]
src\storage.rs:4 use postgres::{Connection, SslMode};
But in this Ok
extern crate postgres;
//use postgres::{Connection, SslMode};
pub fn test_pg(){
let conn =
postgres::Connection::connect(
"postgres://postgres:postgres@localhost/",
&postgres::SslMode::None)
.unwrap();
}