Skip to content

Commit

Permalink
Update Cargo.lock. Calm clippy down
Browse files Browse the repository at this point in the history
  • Loading branch information
SLASHLogin committed Nov 21, 2023
1 parent 45a1ed1 commit 09005f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/database/pagination.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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

0 comments on commit 09005f7

Please sign in to comment.