Fixed compilation warnings on unreachable code when compiling with features flag (#215)
This commit is contained in:
committed by
GitHub
parent
20b25b1074
commit
fa1bcabe5a
@@ -277,12 +277,13 @@ impl Default for Client {
|
||||
|
||||
impl Client {
|
||||
fn default_directory_server() -> String {
|
||||
#[cfg(feature = "qa")]
|
||||
return "https://qa-directory.nymtech.net".to_string();
|
||||
#[cfg(feature = "local")]
|
||||
return "http://localhost:8080".to_string();
|
||||
|
||||
"https://directory.nymtech.net".to_string()
|
||||
if cfg!(feature = "qa") {
|
||||
"https://qa-directory.nymtech.net".to_string()
|
||||
} else if cfg!(feature = "local") {
|
||||
"http://localhost:8080".to_string()
|
||||
} else {
|
||||
"https://directory.nymtech.net".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
fn default_private_identity_key_file(id: &str) -> PathBuf {
|
||||
|
||||
@@ -542,12 +542,13 @@ pub struct Debug {
|
||||
|
||||
impl Debug {
|
||||
fn default_directory_server() -> String {
|
||||
#[cfg(feature = "qa")]
|
||||
return "https://qa-directory.nymtech.net".to_string();
|
||||
#[cfg(feature = "local")]
|
||||
return "http://localhost:8080".to_string();
|
||||
|
||||
"https://directory.nymtech.net".to_string()
|
||||
if cfg!(feature = "qa") {
|
||||
"https://qa-directory.nymtech.net".to_string()
|
||||
} else if cfg!(feature = "local") {
|
||||
"http://localhost:8080".to_string()
|
||||
} else {
|
||||
"https://directory.nymtech.net".to_string()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -376,12 +376,13 @@ pub struct Debug {
|
||||
|
||||
impl Debug {
|
||||
fn default_directory_server() -> String {
|
||||
#[cfg(feature = "qa")]
|
||||
return "https://qa-directory.nymtech.net".to_string();
|
||||
#[cfg(feature = "local")]
|
||||
return "http://localhost:8080".to_string();
|
||||
|
||||
"https://directory.nymtech.net".to_string()
|
||||
if cfg!(feature = "qa") {
|
||||
"https://qa-directory.nymtech.net".to_string()
|
||||
} else if cfg!(feature = "local") {
|
||||
"http://localhost:8080".to_string()
|
||||
} else {
|
||||
"https://directory.nymtech.net".to_string()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -511,12 +511,13 @@ pub struct Debug {
|
||||
|
||||
impl Debug {
|
||||
fn default_directory_server() -> String {
|
||||
#[cfg(feature = "qa")]
|
||||
return "https://qa-directory.nymtech.net".to_string();
|
||||
#[cfg(feature = "local")]
|
||||
return "http://localhost:8080".to_string();
|
||||
|
||||
"https://directory.nymtech.net".to_string()
|
||||
if cfg!(feature = "qa") {
|
||||
"https://qa-directory.nymtech.net".to_string()
|
||||
} else if cfg!(feature = "local") {
|
||||
"http://localhost:8080".to_string()
|
||||
} else {
|
||||
"https://directory.nymtech.net".to_string()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,12 +84,13 @@ impl NymConfig for Config {
|
||||
|
||||
impl Config {
|
||||
fn default_directory_server() -> String {
|
||||
#[cfg(feature = "qa")]
|
||||
return "https://qa-directory.nymtech.net".to_string();
|
||||
#[cfg(feature = "local")]
|
||||
return "http://localhost:8080".to_string();
|
||||
|
||||
"https://directory.nymtech.net".to_string()
|
||||
if cfg!(feature = "qa") {
|
||||
"https://qa-directory.nymtech.net".to_string()
|
||||
} else if cfg!(feature = "local") {
|
||||
"http://localhost:8080".to_string()
|
||||
} else {
|
||||
"https://directory.nymtech.net".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new<S: Into<String>>(id: S) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user