Skip to content

Commit

Permalink
Merge pull request #170 from JoeHut/jh/fix_clippy
Browse files Browse the repository at this point in the history
Make static lifetime of constants explicit
  • Loading branch information
JoeHut authored Nov 20, 2023
2 parents 7cd372d + b3cdcda commit c832995
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub enum Generator {

impl Generator {
/// Tonic include file name
pub const TONIC_INCLUDE_FILE: &str = "buffrs.rs";
pub const TONIC_INCLUDE_FILE: &'static str = "buffrs.rs";

/// Run the generator for a dependency and output files at the provided path
pub async fn run(&self) -> miette::Result<()> {
Expand Down
4 changes: 2 additions & 2 deletions src/package/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ pub struct PackageStore {

impl PackageStore {
/// Path to the proto directory
pub const PROTO_PATH: &str = "proto";
pub const PROTO_PATH: &'static str = "proto";
/// Path to the dependency store
pub const PROTO_VENDOR_PATH: &str = "proto/vendor";
pub const PROTO_VENDOR_PATH: &'static str = "proto/vendor";

fn new(root: PathBuf) -> Self {
Self { root }
Expand Down
4 changes: 2 additions & 2 deletions tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ pub struct VirtualFileSystem {
}

impl VirtualFileSystem {
const VIRTUAL_HOME: &str = "$HOME";
const ROOT_NAME: &str = "root";
const VIRTUAL_HOME: &'static str = "$HOME";
const ROOT_NAME: &'static str = "root";

/// Init an empty virtual file system
pub fn empty() -> Self {
Expand Down

0 comments on commit c832995

Please sign in to comment.