Files
dropbreak/examples/simple.rs
Marcel Müller c88c9cb271 Remove unimplemented! calls
Closes #10
2016-10-22 18:29:20 +02:00

16 lines
444 B
Rust

extern crate rustbreak;
use rustbreak::Database;
fn main() {
let db = Database::open("my_contacts").unwrap();
db.insert("Lapfox", "lapfoxtrax.com").unwrap();
db.insert("Rust", "github.com/rust-lang/rust").unwrap();
// we need to be explicit about the kind of type we want as println! is generic
let rust : String = db.retrieve("Rust").unwrap();
println!("You can find Rust at: {}", rust);
db.flush().unwrap();
}