File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ pub fn update_email_notifications(req: &mut dyn Request) -> CargoResult<Response
246
246
let mut body = String :: new ( ) ;
247
247
req. body ( ) . read_to_string ( & mut body) ?;
248
248
let updates: HashMap < i32 , bool > = serde_json:: from_str :: < Vec < CrateEmailNotifications > > ( & body)
249
- . map_err ( |_| human ( "invalid json request" ) ) ?
249
+ . map_err ( |_| bad_request ( "invalid json request" ) ) ?
250
250
. iter ( )
251
251
. map ( |c| ( c. id , c. email_notifications ) )
252
252
. collect ( ) ;
Original file line number Diff line number Diff line change @@ -592,7 +592,7 @@ fn test_existing_user_email() {
592
592
}
593
593
594
594
/* A user should be able to update the email notifications for crates they own. Only the crates that
595
- were sent in the request should be updated the the corresponding `email_notifications` value.
595
+ were sent in the request should be updated to the corresponding `email_notifications` value.
596
596
*/
597
597
#[ test]
598
598
fn test_update_email_notifications ( ) {
@@ -678,7 +678,7 @@ fn test_update_email_notifications() {
678
678
}
679
679
680
680
/* A user should not be able to update the `email_notifications` value for a crate that is not
681
- owend by them.
681
+ owned by them.
682
682
*/
683
683
#[ test]
684
684
fn test_update_email_notifications_not_owned ( ) {
You can’t perform that action at this time.
0 commit comments