Skip to content

fix: Use explicit 'static lifetime in `define_str_enum`

Dmitry Ivanov requested to merge funbringer/fix-warning-in-define_str_enum into master

Summary

  • fix: Use explicit 'static lifetime in define_str_enum

This patch fixes the following warning:

warning: `&` without an explicit lifetime name cannot be used here
  --> src/traft/node.rs:80:1
   |
80 | / ::tarantool::define_str_enum! {
81 | |     pub enum RaftState {
82 | |         Follower = "Follower",
83 | |         Candidate = "Candidate",
...  |
86 | |     }
87 | | }
   | |_^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010>

Ensure that

  • New code is covered by tests
  • API is documented
  • Changelog is up to date
  • Version is bumped in the appropriate Cargo.toml files
Edited by Dmitry Ivanov

Merge request reports