11use std:: collections:: BTreeMap ;
22
3- use anyhow:: Context ;
43use sheets:: types:: Sheet ;
54
65use crate :: {
@@ -70,19 +69,14 @@ fn reviewer_staff_detail_from_sheet(
7069 continue ;
7170 }
7271
73- let github_login = GithubLogin :: from (
74- cell_string ( & cells[ 0 ] ) . context ( "Failed to read reviewer github login" ) ?,
75- ) ;
72+ let github_login = GithubLogin :: from ( cell_string ( & cells[ 0 ] ) ) ;
7673
7774 let notes = match cells. get ( 6 ) {
78- Some ( cell) => cell_string ( cell) . context ( "Failed to read reviewer notes" ) ? ,
75+ Some ( cell) => cell_string ( cell) ,
7976 None => String :: new ( ) ,
8077 } ;
8178
82- let checked = match (
83- cell_bool ( & cells[ 3 ] ) . context ( "Failed to read reviewer checked" ) ?,
84- cell_bool ( & cells[ 4 ] ) . context ( "Failed to read reviewer check again" ) ?,
85- ) {
79+ let checked = match ( cell_bool ( & cells[ 3 ] ) , cell_bool ( & cells[ 4 ] ) ) {
8680 ( true , false ) => CheckStatus :: CheckedAndOk ,
8781 ( true , true ) => CheckStatus :: CheckedAndCheckAgain ,
8882 ( false , _) => CheckStatus :: Unchecked ,
@@ -91,11 +85,10 @@ fn reviewer_staff_detail_from_sheet(
9185 reviewers. insert (
9286 github_login. clone ( ) ,
9387 ReviewerStaffOnlyDetails {
94- name : cell_string ( & cells[ 1 ] ) . context ( "Failed to read reviewer name" ) ?,
95- attended_training : cell_bool ( & cells[ 2 ] )
96- . context ( "Failed to read reviewer attended training state" ) ?,
88+ name : cell_string ( & cells[ 1 ] ) ,
89+ attended_training : cell_bool ( & cells[ 2 ] ) ,
9790 checked,
98- quality : cell_string ( & cells[ 5 ] ) . context ( "Failed to read reviewer quality" ) ? ,
91+ quality : cell_string ( & cells[ 5 ] ) ,
9992 notes,
10093 } ,
10194 ) ;
0 commit comments