Skip to content

Commit

Permalink
webpki-roots: use explicit lifetimes
Browse files Browse the repository at this point in the history
  • Loading branch information
cpu committed Aug 7, 2024
1 parent 30ac407 commit 2effb54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion webpki-roots/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#![no_std]
#![forbid(unsafe_code, unstable_features)]
#![deny(
elided_lifetimes_in_paths,
trivial_casts,
trivial_numeric_casts,
unused_import_braces,
Expand All @@ -34,7 +35,7 @@

use pki_types::{Der, TrustAnchor};

pub const TLS_SERVER_ROOTS: &[TrustAnchor] = &[
pub const TLS_SERVER_ROOTS: &[TrustAnchor<'static>] = &[
/*
* Issuer: CN=DigiCert TLS ECC P384 Root G5 O=DigiCert, Inc.
* Subject: CN=DigiCert TLS ECC P384 Root G5 O=DigiCert, Inc.
Expand Down
3 changes: 2 additions & 1 deletion webpki-roots/tests/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async fn new_generated_code_is_fresh() {
let tls_roots_map = fetch_ccadb_roots().await;
let mut code = String::with_capacity(256 * 1_024);
code.push_str(HEADER);
code.push_str("pub const TLS_SERVER_ROOTS: &[TrustAnchor] = &[\n");
code.push_str("pub const TLS_SERVER_ROOTS: &[TrustAnchor<'static>] = &[\n");
let (mut subject, mut spki, mut name_constraints) =
(String::new(), String::new(), String::new());

Expand Down Expand Up @@ -162,6 +162,7 @@ const HEADER: &str = r#"//! A compiled-in copy of the root certificates trusted
#![no_std]
#![forbid(unsafe_code, unstable_features)]
#![deny(
elided_lifetimes_in_paths,
trivial_casts,
trivial_numeric_casts,
unused_import_braces,
Expand Down

0 comments on commit 2effb54

Please sign in to comment.