Skip to content

Commit

Permalink
Merge pull request #4158 from ADSteele916/remove-deprecated-intoiter-new
Browse files Browse the repository at this point in the history
Remove call to deprecated array::IntoIter::new
  • Loading branch information
weiznich authored Aug 12, 2024
2 parents bce4881 + 9c3e1d2 commit c482208
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions diesel/src/insertable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,8 @@ where
{
type Values = BatchInsert<Vec<T::Values>, Tab, [T::Values; N], true>;

// We must use the deprecated `IntoIter` function
// here as 1.51 (MSRV) does not support the new not
// deprecated variant
#[allow(deprecated)]
fn values(self) -> Self::Values {
let values = std::array::IntoIter::new(self)
.map(Insertable::values)
.collect::<Vec<_>>();
let values = self.into_iter().map(Insertable::values).collect::<Vec<_>>();
BatchInsert::new(values)
}
}
Expand Down

0 comments on commit c482208

Please sign in to comment.