Skip to content

Commit

Permalink
fix linter messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Karl committed Feb 7, 2024
1 parent 6f6e441 commit f8353f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/client/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub async fn event_loop(
start_opts: ClientStartCommand,
) -> Result<(), EventLoopError> {
let mut client = connect(start_opts.connection).await?;
let mut rng = OsRng::default();
let mut rng = OsRng;
// delete the existing device, so we do not disturb the nat detection
DefaultWireguardInterface::delete_device_if_exists(&start_opts.device);
let backoff = backoff::ExponentialBackoffBuilder::new()
Expand Down Expand Up @@ -91,7 +91,7 @@ pub async fn event_loop(
.unwrap();
StaticSecret::from(secret_key_bytes)
} else {
let private_key = StaticSecret::random_from_rng(OsRng::default());
let private_key = StaticSecret::random_from_rng(OsRng);
tokio::fs::write(
&start_opts.private_key,
BASE64_STANDARD.encode(private_key.to_bytes()),
Expand Down
2 changes: 1 addition & 1 deletion src/client/nat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async fn run_nat_test(
from_alternative_ip: bool,
from_alternative_port: bool,
) -> Result<Vec<Attribute>, ()> {
let mut rng = OsRng::default();
let mut rng = OsRng;
let mut transaction_id_data = [0; 12];
rng.try_fill_bytes(&mut transaction_id_data).unwrap_or_log();
let transaction_id = TransactionId::new(transaction_id_data);
Expand Down

0 comments on commit f8353f9

Please sign in to comment.