Fix CI build error

stable clippy vs nightly clippy
This commit is contained in:
gwenn 2022-10-08 18:57:12 +02:00
parent cd6ce6e2c3
commit ba73b81776

View File

@ -95,7 +95,8 @@ impl Statement<'_> {
pub fn column_name(&self, col: usize) -> Result<&str> { pub fn column_name(&self, col: usize) -> Result<&str> {
self.stmt self.stmt
.column_name(col) .column_name(col)
.ok_or_else(|| Error::InvalidColumnIndex(col)) // clippy::or_fun_call (nightly) vs clippy::unnecessary-lazy-evaluations (stable)
.ok_or(Error::InvalidColumnIndex(col))
.map(|slice| { .map(|slice| {
str::from_utf8(slice.to_bytes()).expect("Invalid UTF-8 sequence in column name") str::from_utf8(slice.to_bytes()).expect("Invalid UTF-8 sequence in column name")
}) })