-
I get the warning with this: let version = option_env!("CARGO_PKG_VERSION");
let version = format!(
"version: {}",
version.unwrap_or_("(unknown version)"),
); It gets quiet when I change it to this: let version = option_env!("CARGO_PKG_VERSION");
let version = format!(
"version: {}",
if let Some(version) = version {
version
} else {
"(unknown version)"
}
}; Is this expected? |
Beta Was this translation helpful? Give feedback.
Answered by
y21
Jul 5, 2023
Replies: 1 comment 3 replies
-
The let version = Some("<package version"); // option_env! expansion
let header = format!("{}",
version.unwrap_or_("(unknown version)")
); which makes it think that the This looks like a bug, and it should check if the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Submitted a PR that fixes this: #11110
(deleted & reposted it here as a reply to this answer and not a new one)