Skip to content

Commit

Permalink
examples: update url dependency
Browse files Browse the repository at this point in the history
This updates the dev-dependency url to the current version v2.5 and revises the url parsing in the examples client and http3-client.
  • Loading branch information
gierens authored Dec 15, 2023
1 parent 8e64c06 commit 3ace6a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion quiche/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ winapi = { version = "0.3", features = ["wincrypt", "ws2def", "ws2ipdef", "ws2tc

[dev-dependencies]
mio = { version = "0.8", features = ["net", "os-poll"] }
url = "1"
url = "2.5"

[lib]
crate-type = ["lib", "staticlib", "cdylib"]
4 changes: 1 addition & 3 deletions quiche/examples/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#[macro_use]
extern crate log;

use std::net::ToSocketAddrs;

use ring::rand::*;

const MAX_DATAGRAM_SIZE: usize = 1350;
Expand Down Expand Up @@ -56,7 +54,7 @@ fn main() {
let mut events = mio::Events::with_capacity(1024);

// Resolve server address.
let peer_addr = url.to_socket_addrs().unwrap().next().unwrap();
let peer_addr = url.socket_addrs(|| None).unwrap()[0];

// Bind to INADDR_ANY or IN6ADDR_ANY depending on the IP family of the
// server address. This is needed on macOS and BSD variants that don't
Expand Down
4 changes: 1 addition & 3 deletions quiche/examples/http3-client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#[macro_use]
extern crate log;

use std::net::ToSocketAddrs;

use quiche::h3::NameValue;

use ring::rand::*;
Expand Down Expand Up @@ -56,7 +54,7 @@ fn main() {
let mut events = mio::Events::with_capacity(1024);

// Resolve server address.
let peer_addr = url.to_socket_addrs().unwrap().next().unwrap();
let peer_addr = url.socket_addrs(|| None).unwrap()[0];

// Bind to INADDR_ANY or IN6ADDR_ANY depending on the IP family of the
// server address. This is needed on macOS and BSD variants that don't
Expand Down

0 comments on commit 3ace6a5

Please sign in to comment.