Skip to content

Commit 8502e48

Browse files
flokliclbot
authored andcommitted
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 <snix@yuka.dev> Autosubmit: Florian Klink <flokli@flokli.de> Tested-by: besadii
1 parent 859faa8 commit 8502e48

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

snix/nix-compat/src/derivation/parser.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ pub fn parse_streaming(i: &[u8]) -> (Result<Derivation, Error<&[u8]>>, &[u8]) {
7979

8080
/// Consume a string containing the algo, and optionally a `r:`
8181
/// prefix, and a digest (bytes), return a [CAHash::Nar] or [CAHash::Flat].
82-
// TODO: This maybe should belong in ca_hash.rs
82+
/// This does not live in CAHash, as its only possible to construct a subset of CAHash kinds,
83+
/// and only used inside Derivation ATerm.
8384
fn from_algo_and_mode_and_digest<B: AsRef<[u8]>>(
8485
algo_and_mode: &str,
8586
digest: B,

0 commit comments

Comments
 (0)