Skip to content

Commit 36169b5

Browse files
authored
Merge pull request #61 from librespot-org/chore/update-dependencies
chore: update dependencies
2 parents da55724 + 55241f0 commit 36169b5

File tree

4 files changed

+23
-18
lines changed

4 files changed

+23
-18
lines changed

.github/workflows/zeroconf_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Install our MSRV
1414
uses: dtolnay/rust-toolchain@stable
1515
with:
16-
toolchain: "1.70"
16+
toolchain: "1.74"
1717

1818
- name: Compile example
1919
run: cargo build --example register

Cargo.toml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,32 @@
22
name = "libmdns"
33
version = "0.9.1"
44
authors = ["Will Stott <willstott101+libmdns@gmail.com>"]
5-
65
description = "mDNS Responder library for building discoverable LAN services in Rust"
76
repository = "https://github.com/librespot-org/libmdns"
87
readme = "README.md"
98
license = "MIT"
109
edition = "2018"
10+
rust-version = "1.74"
1111

1212
[dependencies]
1313
byteorder = "1.5"
14-
if-addrs = { version = "0.12.0", features = ["link-local"] }
15-
hostname = "0.4.0"
16-
log = "0.4"
17-
multimap = "0.10.0"
18-
rand = "0.8"
1914
futures-util = "0.3"
20-
thiserror = "1.0"
21-
tokio = { version = "1.0", features = ["sync", "net", "rt"] }
22-
socket2 = { version = "0.5", features = ["all"] }
15+
hostname = "0.4"
16+
if-addrs = { version = "0.14", features = ["link-local"] }
17+
log = "0.4"
18+
multimap = { version = "0.10", default-features = false }
19+
rand = "0.9"
20+
socket2 = { version = "0.6", features = ["all"] }
21+
thiserror = "2"
22+
tokio = { version = "1", default-features = false, features = [
23+
"sync",
24+
"net",
25+
"rt",
26+
] }
2327

2428
[dev-dependencies]
25-
env_logger = { version = "0.10.2", default-features = false, features = [
26-
"color",
27-
"humantime",
28-
"auto-color",
29+
env_logger = { version = "0.11", default-features = false, features = [
30+
"color",
31+
"humantime",
32+
"auto-color",
2933
] }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ See the [example](https://github.com/librespot-org/libmdns/blob/stable-0.9.x/exa
2020

2121
## Dependencies
2222

23-
libmdns' oldest supported Rust toolchain is `1.70.0`, _however it may compile fine on older versions of rust._
23+
libmdns' MSRV (oldest supported Rust toolchain) is 1.74.0.
2424

2525
**We hold no strong garantees for sticking to a Minimum Supported Rust Version**. Please open an issue on GitHub if you need support for older compilers or different platforms.
2626

src/services.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::dns_parser::{self, Name, QueryClass, RRData};
22
use multimap::MultiMap;
3-
use rand::{thread_rng, Rng};
3+
use rand::{rng, Rng};
44
use std::collections::HashMap;
55
use std::slice;
66
use std::sync::{Arc, RwLock};
@@ -48,9 +48,10 @@ impl ServicesInner {
4848
}
4949

5050
pub fn register(&mut self, svc: ServiceData) -> usize {
51-
let mut id = thread_rng().gen::<usize>();
51+
let random_usize = || rng().random_range(..=usize::MAX);
52+
let mut id = random_usize();
5253
while self.by_id.contains_key(&id) {
53-
id = thread_rng().gen::<usize>();
54+
id = random_usize();
5455
}
5556

5657
self.by_type.insert(svc.typ.clone(), id);

0 commit comments

Comments
 (0)