Remove unnecessary mut
This commit is contained in:
parent
bd21569ab9
commit
d17ab98f6c
1 changed files with 2 additions and 2 deletions
|
@ -32,14 +32,14 @@ async fn view_votes(State(state): State<AppState>, Path(slug): Path<String>) ->
|
|||
}
|
||||
}
|
||||
|
||||
return Json(Page { slug, votes: 0 });
|
||||
Json(Page { slug, votes: 0 })
|
||||
}
|
||||
|
||||
async fn leaderboard_submit_score(State(state): State<AppState>, Path(slug): Path<String>) {
|
||||
tracing::info!("Submitting vote for {slug}");
|
||||
|
||||
let mut found = false;
|
||||
for mut page in &mut state.record.lock().unwrap().pages {
|
||||
for page in &mut state.record.lock().unwrap().pages {
|
||||
if page.slug == slug {
|
||||
page.votes += 1;
|
||||
found = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue