everything here is to taste, but wanted to throw a few rust idioms in that help with some of the indentation drift, if we like them!
+2
-2
web/src/handlers/day.rs
+2
-2
web/src/handlers/day.rs
···
83
83
.markdown_text_part_one(None)
84
84
.map(|s| s.to_string())
85
85
.unwrap_or_else(|_| "Error loading part one".to_string()),
86
-
Some(ref users_did) => match challenge.get_days_challenge(users_did.clone()).await {
86
+
Some(ref users_did) => match challenge.get_days_challenge(&users_did).await {
87
87
Ok(current_challenge) => match current_challenge {
88
88
None => {
89
89
let new_code = challenge
···
186
186
.markdown_text_part_two(None)
187
187
.map(|opt| opt.map(|s| s.to_string()))
188
188
.unwrap_or(None),
189
-
Some(users_did) => match challenge.get_days_challenge(users_did.clone()).await {
189
+
Some(users_did) => match challenge.get_days_challenge(&users_did).await {
190
190
Ok(current_challenge) => match current_challenge {
191
191
None => {
192
192
if challenge.has_part_two() {
History
1 round
1 comment
bad-example.com
submitted
#0
1 commit
expand
collapse
flatten day1 part1 challenge check
expand 1 comment
pull request successfully merged
LGTM!