diff --git a/dee/src/config.rs b/dee/src/config.rs index 1d06941..c4d4e4c 100644 --- a/dee/src/config.rs +++ b/dee/src/config.rs @@ -14,8 +14,8 @@ pub struct Local { } impl Local { - const APP_NAME: &str = env!("CARGO_PKG_NAME"); - const CONFIG_NAME: Option<&str> = Some("default"); + const APP_NAME: &'static str = env!("CARGO_PKG_NAME"); + const CONFIG_NAME: Option<&'static str> = Some("default"); pub fn load() -> Self { confy::load(Self::APP_NAME, Self::CONFIG_NAME).unwrap() diff --git a/drand_core/examples/coin_flip.rs b/drand_core/examples/coin_flip.rs index ef8d908..a16ddea 100644 --- a/drand_core/examples/coin_flip.rs +++ b/drand_core/examples/coin_flip.rs @@ -15,7 +15,7 @@ fn main() { let mut rng = ChaCha20Rng::from_seed(seed); // Flip a coin using the seeded RNG. - let coin = vec!["HEAD", "TAIL"]; + let coin = ["HEAD", "TAIL"]; let flip = coin.choose(&mut rng).unwrap(); println!("{flip} (round {round})"); } diff --git a/drand_core/src/http_client.rs b/drand_core/src/http_client.rs index 5de4d4f..2e10976 100644 --- a/drand_core/src/http_client.rs +++ b/drand_core/src/http_client.rs @@ -129,9 +129,7 @@ impl HttpClient { .call() .map_err(|e| -> DrandError { match e { - ureq::Error::Status(404, _) => { - Box::new(BeaconError::NotFound).into() - } + ureq::Error::Status(404, _) => Box::new(BeaconError::NotFound).into(), _ => Box::new(HttpClientError::RequestFailed(e.into())).into(), } })?