Skip to content

Commit

Permalink
Merge branch 'master' into benchs
Browse files Browse the repository at this point in the history
  • Loading branch information
c410-f3r authored Dec 30, 2023
2 parents 2c3feb8 + fb34be0 commit 7f613c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion diesel_cli/src/infer_schema_internals/foreign_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn remove_unsafe_foreign_keys_for_codegen(
"Error loading primary keys for `{}`",
fk.parent_table
));
pk_columns.len() == 1 && Some(&pk_columns[0]) == fk.primary_key_columns.get(0)
pk_columns.len() == 1 && Some(&pk_columns[0]) == fk.primary_key_columns.first()
})
.filter(|fk| !duplicates.contains(&fk.ordered_tables()))
.cloned()
Expand Down
2 changes: 1 addition & 1 deletion examples/postgres/advanced-blog-cli/src/pagination.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl<T> Paginated<T> {
{
let per_page = self.per_page;
let results = self.load::<(U, i64)>(conn)?;
let total = results.get(0).map(|x| x.1).unwrap_or(0);
let total = results.first().map(|x| x.1).unwrap_or(0);
let records = results.into_iter().map(|x| x.0).collect();
let total_pages = (total as f64 / per_page as f64).ceil() as i64;
Ok((records, total_pages))
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.74.0
1.75.0

0 comments on commit 7f613c8

Please sign in to comment.