@@ -106,6 +106,7 @@ mod tests {
106106 }
107107}
108108
109+ #[ allow( dead_code) ]
109110fn calculate_checksum ( filename : & String , data : & [ u8 ] ) {
110111 let hash = sha2_512:: default ( ) . update ( data) . finalize ( ) ;
111112 let digest = hash. digest ( ) ;
@@ -217,6 +218,7 @@ async fn write_file_to_blob_streaming(
217218
218219/// Write file to Azure blob storage (legacy version using Vec<u8>)
219220/// TBD: Rework, do not keep whole file as Vec<u8> in memory!!!
221+ #[ allow( dead_code) ]
220222async fn write_file_to_blob (
221223 filename : String ,
222224 data : Vec < u8 > ,
@@ -378,7 +380,6 @@ async fn get_file_from_blob(filename: String) -> ReceivedFile {
378380 let blob_client = ClientBuilder :: new ( storage_account, storage_credential)
379381 . blob_client ( storage_container, storage_blob) ;
380382 let blob_url_res = blob_client. url ( ) ;
381- let mut blob_url = "" . to_string ( ) ;
382383 let mut received_file = ReceivedFile {
383384 original_filename : "" . to_string ( ) ,
384385 cached_filename : "" . to_string ( ) ,
@@ -387,16 +388,13 @@ async fn get_file_from_blob(filename: String) -> ReceivedFile {
387388 } ;
388389 received_file. original_filename = filename. clone ( ) ;
389390
390- match blob_url_res {
391- Ok ( url) => {
392- //println!("Blob URL: {}", url);
393- blob_url = url. to_string ( ) ;
394- }
391+ let mut blob_url = match blob_url_res {
392+ Ok ( url) => url. to_string ( ) ,
395393 Err ( e) => {
396394 eprintln ! ( "Error getting blob URL: {:?}" , e) ;
397395 return received_file;
398396 }
399- }
397+ } ;
400398 // append SAS token to blob URL
401399 blob_url. push_str ( storage_sastoken) ;
402400 // we generate a hash of the filename to use as cache filename
@@ -527,6 +525,7 @@ async fn get_file_from_blob(filename: String) -> ReceivedFile {
527525
528526// Implement set tags for Azure blob storage
529527// tags are in format "key=value"
528+ #[ allow( dead_code) ]
530529async fn azure_set_filename_tags (
531530 filename : String ,
532531 user_tags : Vec < ( String , String ) > ,
@@ -571,7 +570,8 @@ async fn azure_set_filename_tags(
571570 }
572571}
573572
574- async fn azure_list_files ( directory : String ) -> Vec < String > {
573+ #[ allow( dead_code) ]
574+ async fn azure_list_files ( _directory : String ) -> Vec < String > {
575575 let azure_cfg = Arc :: new ( get_azure_credentials ( "azure" ) ) ;
576576 let storage_account = azure_cfg. account . as_str ( ) ;
577577 let storage_key = azure_cfg. key . clone ( ) ;
0 commit comments