Doing some overall warning cleanup.
This commit is contained in:
@ -3,12 +3,15 @@
|
||||
|
||||
|
||||
/// The environment variable defined by Cargo for the name.
|
||||
#[allow(dead_code)]
|
||||
const NAME: Option<&str> = option_env!("CARGO_PKG_NAME");
|
||||
|
||||
/// The environment variable defined by Cargo for the version.
|
||||
#[allow(dead_code)]
|
||||
const VERSION: Option<&str> = option_env!("CARGO_PKG_VERSION");
|
||||
|
||||
/// The string to display if a value is not defined during compile time.
|
||||
#[allow(dead_code)]
|
||||
const NOT_DEFINED: &'static str = "UNDEFINED";
|
||||
|
||||
|
||||
@ -17,6 +20,7 @@ const NOT_DEFINED: &'static str = "UNDEFINED";
|
||||
/// set at compile time and comes from the Cargo.toml file.
|
||||
///
|
||||
/// If a value is not found, then it will return the not defined value.
|
||||
#[allow(dead_code)]
|
||||
pub fn get_name() -> &'static str
|
||||
{
|
||||
NAME.unwrap_or(NOT_DEFINED)
|
||||
@ -27,6 +31,7 @@ pub fn get_name() -> &'static str
|
||||
/// This is set at compile time and comes from the Cargo.toml file.
|
||||
///
|
||||
/// If a value is not found, then it will return the not defined value.
|
||||
#[allow(dead_code)]
|
||||
pub fn get_version() -> &'static str
|
||||
{
|
||||
VERSION.unwrap_or(NOT_DEFINED)
|
||||
|
||||
Reference in New Issue
Block a user