Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
lib: Fix omitted lifetime in associated consts
Browse files Browse the repository at this point in the history
See the tracking issue rust-lang/rust#115010

There's now a warning for this in newer Rust versions.
  • Loading branch information
cgwalters committed Jan 3, 2024
1 parent 7c3f8b8 commit 9391353
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions lib/src/container/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ impl TryFrom<&str> for Transport {
}

impl Transport {
const OCI_STR: &str = "oci";
const OCI_ARCHIVE_STR: &str = "oci-archive";
const CONTAINERS_STORAGE_STR: &str = "containers-storage";
const LOCAL_DIRECTORY_STR: &str = "dir";
const REGISTRY_STR: &str = "registry";
const OCI_STR: &'static str = "oci";
const OCI_ARCHIVE_STR: &'static str = "oci-archive";
const CONTAINERS_STORAGE_STR: &'static str = "containers-storage";
const LOCAL_DIRECTORY_STR: &'static str = "dir";
const REGISTRY_STR: &'static str = "registry";

/// Retrieve an identifier that can then be re-parsed from [`Transport::try_from::<&str>`].
pub fn serializable_name(&self) -> &'static str {
Expand Down
6 changes: 3 additions & 3 deletions lib/src/container/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@ fn timestamp_of_manifest_or_config(

impl ImageImporter {
/// The metadata key used in ostree commit metadata to serialize
const CACHED_KEY_MANIFEST_DIGEST: &str = "ostree-ext.cached.manifest-digest";
const CACHED_KEY_MANIFEST: &str = "ostree-ext.cached.manifest";
const CACHED_KEY_CONFIG: &str = "ostree-ext.cached.config";
const CACHED_KEY_MANIFEST_DIGEST: &'static str = "ostree-ext.cached.manifest-digest";
const CACHED_KEY_MANIFEST: &'static str = "ostree-ext.cached.manifest";
const CACHED_KEY_CONFIG: &'static str = "ostree-ext.cached.config";

/// Create a new importer.
#[context("Creating importer")]
Expand Down

0 comments on commit 9391353

Please sign in to comment.