From 8502e487c48d359e07eef41f16a207f17ac6b8e2 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 5 Jun 2025 22:40:34 +0300 Subject: [PATCH] docs(nix-compat/derivation/parser): explain why from_algo_and_mode_and_digest lives here Change-Id: Id11026115a98703ac0e7d27fcb2286e5afe35f4c Reviewed-on: https://cl.snix.dev/c/snix/+/30566 Reviewed-by: Yureka Autosubmit: Florian Klink Tested-by: besadii --- snix/nix-compat/src/derivation/parser.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snix/nix-compat/src/derivation/parser.rs b/snix/nix-compat/src/derivation/parser.rs index a6bca6937..d1d0ff0fe 100644 --- a/snix/nix-compat/src/derivation/parser.rs +++ b/snix/nix-compat/src/derivation/parser.rs @@ -79,7 +79,8 @@ pub fn parse_streaming(i: &[u8]) -> (Result>, &[u8]) { /// Consume a string containing the algo, and optionally a `r:` /// prefix, and a digest (bytes), return a [CAHash::Nar] or [CAHash::Flat]. -// TODO: This maybe should belong in ca_hash.rs +/// This does not live in CAHash, as its only possible to construct a subset of CAHash kinds, +/// and only used inside Derivation ATerm. fn from_algo_and_mode_and_digest>( algo_and_mode: &str, digest: B,