mirror of
https://github.com/kristoferssolo/captra.git
synced 2026-02-25 04:58:15 +00:00
refactor(tests): fix clippy warnings
This commit is contained in:
14
tests/common/host.rs
Normal file
14
tests/common/host.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use crate::common::manifest::load_example_manifest;
|
||||
use captra::HostState;
|
||||
use ed25519_dalek::SigningKey;
|
||||
use rand::rngs::OsRng;
|
||||
|
||||
/// Build a [`HostState`] with a fixed seed and a fresh [`SigningKey`] (`OsRng`).
|
||||
/// # Panics
|
||||
#[must_use]
|
||||
pub fn make_host_with_seed(seed: u64) -> HostState {
|
||||
let manifest = load_example_manifest();
|
||||
let mut csprng = OsRng;
|
||||
let keypair = SigningKey::generate(&mut csprng);
|
||||
HostState::new(manifest, seed, keypair)
|
||||
}
|
||||
Reference in New Issue
Block a user