Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tls/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ where
{
let mock = R::load(input)?;
let log = mock.to_bytes()?;
Ok(std::fs::write(output, &log).with_context(|| {
format!("write mock measurement log to file: {}", output)
})?)
std::fs::write(output, &log).with_context(|| {
format!("write mock measurement log to file: {output}")
})
}

/// Execute one of the `attest-mock` commands to generate attestation
/// artifacts used in testing.
fn main() -> Result<()> {
#[cfg(target_os = "illumos")]
{
println!("cargo:rustc-link-arg=-Wl,-R{}", OXIDE_PLATFORM);
println!("cargo:rustc-link-search={}", OXIDE_PLATFORM);
println!("cargo:rustc-link-arg=-Wl,-R{OXIDE_PLATFORM}");
println!("cargo:rustc-link-search={OXIDE_PLATFORM}");
}

#[cfg(feature = "unittest")]
Expand All @@ -51,7 +51,7 @@ fn main() -> Result<()> {
let config_path = "test-keys/config.kdl";
let doc =
config::load_and_validate(config_path.as_ref()).map_err(|e| {
anyhow!("Loading config from \"{}\" failed: {e:?}", config_path)
anyhow!("Loading config from \"{config_path}\" failed: {e:?}")
})?;

doc.write_key_pairs(outdir.clone(), OutputFileExistsBehavior::Skip)
Expand Down
2 changes: 1 addition & 1 deletion tls/examples/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async fn main() {

let args = Args::parse();

if args.roots.len() < 1 {
if args.roots.is_empty() {
panic!("Need at least one root");
}

Expand Down
2 changes: 1 addition & 1 deletion tls/examples/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async fn main() {

let args = Args::parse();

if args.roots.len() < 1 {
if args.roots.is_empty() {
panic!("Must specify at least one root");
}

Expand Down
Loading