Any help with this? Using your example, but getting a compile time errors. (copy/pasted your code)
"let row = row_result?;"
Produces a compile time error of:
the ? operator can only be used in a function that returns Result or Option (or another type that implements FromResidual)
the trait FromResidual<Result<Infallible, oracle::Error>> is not implemented for ()
Get that on each of the lines below on the ? character.
// Run Oracle Query
let rows = conn.query("SELECT myname, myvalue FROM marktest", &[&30])?;
for row_result in rows {
let row = row_result?;
let myname: String = row.get(0)?;
let myvalue: String = row.get(1)?;
println!(" {:14}| {:>10} ", myname, myvalue);
}
Any help with this? Using your example, but getting a compile time errors. (copy/pasted your code)
"let row = row_result?;" Produces a compile time error of:
the
?
operator can only be used in a function that returnsResult
orOption
(or another type that implementsFromResidual
) the traitFromResidual<Result<Infallible, oracle::Error>>
is not implemented for()
Get that on each of the lines below on the ? character.