refactor(tvix/store/nar): pass in &proto::node::Node

Passing in a &proto::node::Node into all this allows us consumers to
keep ownership of the proto::node::Node.

Change-Id: I44882a86c46826b06a8a8a0b24c18adfc7052662
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8316
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
This commit is contained in:
Florian Klink 2023-03-16 23:54:29 +01:00 committed by clbot
parent 985f842e32
commit b025ebb2a1
5 changed files with 29 additions and 21 deletions

View file

@ -64,7 +64,7 @@ impl<
) -> Result<Response<proto::CalculateNarResponse>> {
match request.into_inner().node {
None => Err(Status::invalid_argument("no root node sent")),
Some(root_node) => match self.nar_calculation_service.calculate_nar(root_node) {
Some(root_node) => match self.nar_calculation_service.calculate_nar(&root_node) {
Ok(resp) => Ok(Response::new(resp)),
Err(e) => Err(e.into()),
},