File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -198,23 +198,21 @@ unsafe fn send_hook(
198198 }
199199
200200 // Add Steam auth ticket when fetching song ID
201- if url. ends_with ( "/as_steamlogin/game_fetchsongid_unicode.php" ) && global_data. ticket . is_some ( )
202- {
203- new_form_data. set_one ( "ticket" , global_data. ticket . as_ref ( ) . unwrap ( ) ) ;
201+ if url. ends_with ( "/as_steamlogin/game_fetchsongid_unicode.php" ) {
202+ if let Some ( ticket) = & global_data. ticket {
203+ new_form_data. set_one ( "ticket" , ticket) ;
204+ }
204205 }
205206
206207 // Add recording and release MBIDs (if present), when fetching song ID and submitting a score
207208 if url. ends_with ( "/as_steamlogin/game_fetchsongid_unicode.php" )
208209 || url. ends_with ( "/as_steamlogin/game_SendRideSteamVerified.php" )
209210 {
210- if global_data. current_mbid . is_some ( ) {
211- new_form_data. set_one ( "mbid" , global_data . current_mbid . as_ref ( ) . unwrap ( ) ) ;
211+ if let Some ( mbid ) = & global_data. current_mbid {
212+ new_form_data. set_one ( "mbid" , mbid ) ;
212213 }
213- if global_data. current_release_mbid . is_some ( ) {
214- new_form_data. set_one (
215- "releasembid" ,
216- global_data. current_release_mbid . as_ref ( ) . unwrap ( ) ,
217- ) ;
214+ if let Some ( release_mbid) = & global_data. current_release_mbid {
215+ new_form_data. set_one ( "releasembid" , release_mbid) ;
218216 }
219217 }
220218
You can’t perform that action at this time.
0 commit comments