This seems to be required because passing `compiler_version()` directly to `command` fails because it's not a string, and we can't seem to convert it to a string inline.
()
| 96 | /// `command` fails because it's not a string, and we can't seem to convert it |
| 97 | /// to a string inline. |
| 98 | pub fn compiler_version_str() -> &'static str { |
| 99 | static COMPILER_VERSION: std::sync::OnceLock<String> = std::sync::OnceLock::new(); |
| 100 | COMPILER_VERSION.get_or_init(|| compiler_version().to_string()) |
| 101 | } |
| 102 | |
| 103 | #[derive(Subcommand, Debug, Clone)] |
| 104 | #[command(name = env!("CARGO_PKG_NAME"), about, version=compiler_version_str())] |
nothing calls this directly
no test coverage detected