core::fmt::String missing for error
leshow opened this issue · comments
Evan Cameron commented
running the example code I'm getting a
the trait `core::fmt::String` is not implemented for the type `leveldb::database::error::Error` [E0277]
src/main.rs:45 Err(e) => { panic!("failed to open database: {}", e) }
I believe error is just missing a #[derive(Display)] in order for it to be printed to the console, am I correct?
Florian Gilcher commented
Eh, yes :), somewhat. Use "{:?}" as an output marker. That uses fmt::Debug
instead, which all the types implement. I do agree that errors should probably implement Display as well, I'll file this as a sep bug.
I cannot fix it this morning.
Probably better run the example in https://github.com/skade/leveldb/blob/master/src/lib.rs and lobby for this change in cargo: rust-lang/cargo#383
The README code is currently not run as tests for that reason :(.
Florian Gilcher commented
Hi, I fixed the example.