Hi. noob here. I'm trying to create a sqlite database
let conn = Connection::open_in_memory().unwrap();
the doc tells me I can open like this: open<P: AsRef<Path>>(path: P) -> Result<Connection>
Benjamin Z
@benjyz
nice.. got it let conn = Connection::open(path).unwrap();
Benjamin Z
@benjyz
how do I put off warnings in cargo?
Thomas Koehler
@Bastacyclop
which warnings ?
Benjamin Z
@benjyz
"function is never used: xyz, #[warn(dead_code)] on by default"
e.g.
Thomas Koehler
@Bastacyclop
FYI this comes from the rust compiler (rustc) which is called by cargo. You can use #[allow(dead_code)] in the code. This is called an attribute https://doc.rust-lang.org/book/attributes.html.
Benjamin Z
@benjyz
thanks. equally I try to ignore other warnings with
warning: unused import, #[warn(unused_imports)] on by default
with this.. doesn't work "#![warn(unused_imports)]"
Thomas Koehler
@Bastacyclop
#[warn(stuff)] means you want a warning#[allow(stuff)] means you don't want anything#[deny(stuff)] means you want an error