Skip to content

Commit

Permalink
is-empty-check on constant read from environment var
Browse files Browse the repository at this point in the history
  • Loading branch information
bertiqwerty committed Jun 23, 2024
1 parent 6203877 commit 962a38d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rvimage/src/rvlib/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ pub fn natural_cmp(s1: &str, s2: &str) -> Ordering {
pub fn version_label() -> String {
const VERSION: &str = env!("CARGO_PKG_VERSION");
const GIT_DESC: &str = env!("GIT_DESC");
#[allow(clippy::const_is_empty)]
if !GIT_DESC.is_empty() {
const GIT_DIRTY: &str = env!("GIT_DIRTY");
let is_dirty = GIT_DIRTY == "true";
Expand Down

0 comments on commit 962a38d

Please sign in to comment.