refactor(tvix/castore/directory): remove GRPCPutter::new
This is no public API to construct this, there's exactly one caller, and it's perfectly fine to directly populate the struct there. Change-Id: Idae43a0162ee9bc687d21c550e0c9df33f12d263 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11217 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
		
							parent
							
								
									2350c5cbf6
								
							
						
					
					
						commit
						60b47b336b
					
				
					 1 changed files with 3 additions and 10 deletions
				
			
		|  | @ -201,7 +201,9 @@ impl DirectoryService for GRPCDirectoryService { | |||
|             Ok(s) | ||||
|         }); | ||||
| 
 | ||||
|         Box::new(GRPCPutter::new(tx, task)) | ||||
|         Box::new(GRPCPutter { | ||||
|             rq: Some((task, tx)), | ||||
|         }) | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | @ -219,15 +221,6 @@ pub struct GRPCPutter { | |||
| } | ||||
| 
 | ||||
| impl GRPCPutter { | ||||
|     pub fn new( | ||||
|         directory_sender: UnboundedSender<proto::Directory>, | ||||
|         task: JoinHandle<Result<proto::PutDirectoryResponse, Status>>, | ||||
|     ) -> Self { | ||||
|         Self { | ||||
|             rq: Some((task, directory_sender)), | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     // allows checking if the tx part of the channel is closed.
 | ||||
|     // only used in the test case.
 | ||||
|     #[cfg(test)] | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue