From 7e78ebe796c2bb8b5cad09ac8819e091df87e19b Mon Sep 17 00:00:00 2001 From: Ilan Joselevich Date: Wed, 16 Oct 2024 14:55:49 +0200 Subject: [PATCH] fix(tvix/glue/builtins/import): Drop useless bstring conversion In a previous refactoring CL this into_bstring method was accidentally kept, when we don't need it and can just to_str directly. Change-Id: Idd531d508b8fd530611b213d0164e7aaf0e87d80 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12631 Tested-by: BuildkiteCI Reviewed-by: flokli Autosubmit: Ilan Joselevich --- tvix/glue/src/builtins/import.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tvix/glue/src/builtins/import.rs b/tvix/glue/src/builtins/import.rs index db60f44de..d3a93e520 100644 --- a/tvix/glue/src/builtins/import.rs +++ b/tvix/glue/src/builtins/import.rs @@ -162,10 +162,7 @@ mod import_builtins { .select("sha256") .map(|h| { h.to_str().and_then(|expected| { - match nix_compat::nixhash::from_str( - expected.into_bstring().to_str()?, - Some("sha256"), - ) { + match nix_compat::nixhash::from_str(expected.to_str()?, Some("sha256")) { Ok(NixHash::Sha256(digest)) => Ok(digest), Ok(_) => unreachable!(), Err(_e) => {