@@ -475,9 +475,7 @@ fn extract_via_oci_api(image: &str, src_path_in_image: &str, dst: &Path) -> Resu
475475
476476 eprintln ! ( "pyhl: pull {image} (via OCI API)" ) ;
477477
478- let token_url = format ! (
479- "https://ghcr.io/token?scope=repository:{repo}:pull"
480- ) ;
478+ let token_url = format ! ( "https://ghcr.io/token?scope=repository:{repo}:pull" ) ;
481479 let token_body: serde_json:: Value = serde_json:: from_slice (
482480 & ureq:: get ( & token_url)
483481 . call ( )
@@ -489,9 +487,7 @@ fn extract_via_oci_api(image: &str, src_path_in_image: &str, dst: &Path) -> Resu
489487 . as_str ( )
490488 . ok_or_else ( || anyhow ! ( "GHCR token response missing 'token' field" ) ) ?;
491489
492- let manifest_url = format ! (
493- "https://ghcr.io/v2/{repo}/manifests/{tag}"
494- ) ;
490+ let manifest_url = format ! ( "https://ghcr.io/v2/{repo}/manifests/{tag}" ) ;
495491 let manifest: serde_json:: Value = serde_json:: from_slice (
496492 & ureq:: get ( & manifest_url)
497493 . header ( "Authorization" , & format ! ( "Bearer {token}" ) )
@@ -528,7 +524,10 @@ fn extract_via_oci_api(image: &str, src_path_in_image: &str, dst: &Path) -> Resu
528524 for entry in archive. entries ( ) ? {
529525 let mut entry = entry?;
530526 let path = entry. path ( ) ?;
531- if path. to_str ( ) . is_some_and ( |p| p. trim_start_matches ( "./" ) == target_name) {
527+ if path
528+ . to_str ( )
529+ . is_some_and ( |p| p. trim_start_matches ( "./" ) == target_name)
530+ {
532531 if let Some ( parent) = dst. parent ( ) {
533532 std:: fs:: create_dir_all ( parent) ?;
534533 }
0 commit comments