Skip to content

Commit

Permalink
Fixes rust fmt following upgrade to 1.74
Browse files Browse the repository at this point in the history
  • Loading branch information
thibmeu committed Feb 29, 2024
1 parent c48fd7f commit 93476aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dee/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion drand_core/examples/coin_flip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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})");
}
4 changes: 1 addition & 3 deletions drand_core/src/http_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
})?
Expand Down

0 comments on commit 93476aa

Please sign in to comment.