File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -712,6 +712,7 @@ impl From<VersionQueryResult> for Version {
712712                . files 
713713                . into_iter ( ) 
714714                . map ( |f| VersionFile  { 
715+                     id :  Some ( f. id . 0 ) , 
715716                    url :  f. url , 
716717                    filename :  f. filename , 
717718                    hashes :  f. hashes , 
@@ -836,6 +837,10 @@ impl VersionStatus {
836837/// A single project file, with a url for the file and the file's hash 
837838#[ derive( Serialize ,  Deserialize ,  Clone ) ]  
838839pub  struct  VersionFile  { 
840+     /// The ID of the file. Every file has an ID once created, but it 
841+ /// is not known until it indeed has been created. 
842+ #[ serde( default ,  skip_serializing_if = "Option::is_none" ) ]  
843+     pub  id :  Option < i64 > , 
839844    /// A map of hashes of the file.  The key is the hashing algorithm 
840845/// and the value is the string version of the hash. 
841846pub  hashes :  std:: collections:: HashMap < String ,  String > , 
Original file line number Diff line number Diff line change @@ -446,6 +446,7 @@ async fn version_create_inner(
446446            . files 
447447            . iter ( ) 
448448            . map ( |file| VersionFile  { 
449+                 id :  None , 
449450                hashes :  file
450451                    . hashes 
451452                    . iter ( ) 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments