diff options
author | Florian Klink <flokli@flokli.de> | 2024-07-21T20·49+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-07-21T21·41+0000 |
commit | 05b4e805eeda9dc827e1464d5fd5f672b8daf26e (patch) | |
tree | fe5d04f594085532790bd680c572b7be4338099f /tvix/nix-compat/src/nixcpp | |
parent | 62184ee35acac69666ba26c7db852a4059fa5723 (diff) |
refactor(tvix/nix-compat): rename PubKey to VerifyingKey r/8394
Align these with the way it's called in the ed25519 crates. Change-Id: Ia52d3bb9bf831dc6b5f7d5356f5ac62135672883 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12013 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/nix-compat/src/nixcpp')
-rw-r--r-- | tvix/nix-compat/src/nixcpp/conf.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tvix/nix-compat/src/nixcpp/conf.rs b/tvix/nix-compat/src/nixcpp/conf.rs index 909b3c9eb4a6..68308115f988 100644 --- a/tvix/nix-compat/src/nixcpp/conf.rs +++ b/tvix/nix-compat/src/nixcpp/conf.rs @@ -13,7 +13,7 @@ pub struct NixConfig<'a> { pub sandbox_fallback: Option<bool>, pub substituters: Option<Vec<&'a str>>, pub system_features: Option<Vec<&'a str>>, - pub trusted_public_keys: Option<Vec<crate::narinfo::PubKey>>, + pub trusted_public_keys: Option<Vec<crate::narinfo::VerifyingKey>>, pub trusted_substituters: Option<Vec<&'a str>>, pub trusted_users: Option<Vec<&'a str>>, pub extra_platforms: Option<Vec<&'a str>>, @@ -78,8 +78,8 @@ impl<'a> NixConfig<'a> { "trusted-public-keys" => { this.trusted_public_keys = Some( val.split_whitespace() - .map(crate::narinfo::PubKey::parse) - .collect::<Result<Vec<crate::narinfo::PubKey>, _>>() + .map(crate::narinfo::VerifyingKey::parse) + .collect::<Result<Vec<crate::narinfo::VerifyingKey>, _>>() .ok()?, ) } @@ -155,7 +155,7 @@ impl FromStr for SandboxSetting { #[cfg(test)] mod tests { - use crate::{narinfo::PubKey, nixcpp::conf::SandboxSetting}; + use crate::{narinfo::VerifyingKey, nixcpp::conf::SandboxSetting}; use super::NixConfig; @@ -175,9 +175,9 @@ mod tests { substituters: Some(vec!["https://nix-community.cachix.org", "https://cache.nixos.org/"]), system_features: Some(vec!["nixos-test", "benchmark", "big-parallel", "kvm"]), trusted_public_keys: Some(vec![ - PubKey::parse("cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=") + VerifyingKey::parse("cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=") .expect("failed to parse pubkey"), - PubKey::parse("nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=") + VerifyingKey::parse("nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=") .expect("failed to parse pubkey") ]), trusted_substituters: Some(vec![]), |