Closed cammeresi closed 1 week ago
LGTM, but the specific example in the PR description would probably be more cleanly implemented as x.set(stmt).ok().expect(...)
since the debug representation of the second statement is probably not going to provide any extra clarity.
The lack of this common trait bound caused some unpleasantness. For example, the following didn't compile:
let x = OnceLock::new(); let stmt = db.prepare(...)?; x.set(stmt).expect(...); // returns Result<(), T=Statement> where T: Debug