Upgrade to Rust 1.86.0

This commit is contained in:
Christien Rioux 2025-05-14 18:21:56 -04:00
parent 452e4d0ab8
commit 13d5ca65d6
8 changed files with 502 additions and 437 deletions

511
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -14,7 +14,7 @@ repository = "https://gitlab.com/veilid/veilid"
authors = ["Veilid Team <contact@veilid.com>"]
license = "MPL-2.0"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.86.0"
[patch.crates-io]
cursive = { git = "https://gitlab.com/veilid/cursive.git" }

View file

@ -18,7 +18,7 @@ ENV ZIG_VERSION=0.13.0
ENV CMAKE_VERSION_MINOR=3.30
ENV CMAKE_VERSION_PATCH=3.30.1
ENV WASM_BINDGEN_CLI_VERSION=0.2.100
ENV RUST_VERSION=1.81.0
ENV RUST_VERSION=1.86.0
ENV RUSTUP_HOME=/usr/local/rustup
ENV RUSTUP_DIST_SERVER=https://static.rust-lang.org
ENV CARGO_HOME=/usr/local/cargo

View file

@ -198,7 +198,7 @@ impl IGDManager {
// Map any port
let desc = this.get_description(protocol_type, local_port);
let mapped_port = match gw.add_any_port(convert_protocol_type(protocol_type), SocketAddr::new(local_ip, local_port), (UPNP_MAPPING_LIFETIME_MS + 999) / 1000, &desc) {
let mapped_port = match gw.add_any_port(convert_protocol_type(protocol_type), SocketAddr::new(local_ip, local_port), UPNP_MAPPING_LIFETIME_MS.div_ceil(1000), &desc) {
Ok(mapped_port) => mapped_port,
Err(e) => {
// Failed to map external port
@ -295,7 +295,7 @@ impl IGDManager {
match gw.add_any_port(
convert_protocol_type(k.protocol_type),
SocketAddr::new(local_ip, k.local_port),
(UPNP_MAPPING_LIFETIME_MS + 999) / 1000,
UPNP_MAPPING_LIFETIME_MS.div_ceil(1000),
&desc,
) {
Ok(mapped_port) => {
@ -343,7 +343,7 @@ impl IGDManager {
convert_protocol_type(k.protocol_type),
v.mapped_port,
SocketAddr::new(local_ip, k.local_port),
(UPNP_MAPPING_LIFETIME_MS + 999) / 1000,
UPNP_MAPPING_LIFETIME_MS.div_ceil(1000),
&desc,
) {
Ok(()) => {

View file

@ -138,7 +138,7 @@ pub fn capability_fanout_node_info_filter(caps: Vec<Capability>) -> FanoutNodeIn
/// * 'node_count' - the number of nodes to keep in the closest_nodes set
/// * 'fanout' - the number of concurrent calls being processed at the same time
/// * 'consensus_count' - the number of nodes in the processed queue that need to be in the
/// 'Accepted' state before we terminate the fanout early.
/// 'Accepted' state before we terminate the fanout early.
///
/// The algorithm returns early if 'check_done' returns some value, or if an error is found during the process.
/// If the algorithm times out, a Timeout result is returned, however operations will still have been performed and a

View file

@ -830,7 +830,7 @@ impl VeilidConfig {
/// specified to override this location
///
/// * `program_name` - Pick a program name and do not change it from release to release,
/// see `VeilidConfig::program_name` for details.
/// see `VeilidConfig::program_name` for details.
/// * `organization_name` - Similar to program_name, but for the organization publishing this app
/// * `qualifier` - Suffix for the application bundle name
/// * `storage_directory` - Override for the path where veilid-core stores its content

View file

@ -124,8 +124,8 @@ pub struct IpcIncoming<'a> {
impl Stream for IpcIncoming<'_> {
type Item = io::Result<IpcStream>;
fn poll_next<'a>(
mut self: std::pin::Pin<&'a mut Self>,
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
if self.unord.is_empty() {

View file

@ -87,7 +87,7 @@ impl PlatformSupportWindows {
for (n, netmask_elt) in netmask
.iter_mut()
.enumerate()
.take((prefix.PrefixLength as usize + 7) / 8)
.take((prefix.PrefixLength as usize).div_ceil(8))
{
let x_byte = ipv4_addr.octets()[n];
let y_byte = a.octets()[n];
@ -140,7 +140,7 @@ impl PlatformSupportWindows {
for (n, netmask_elt) in netmask
.iter_mut()
.enumerate()
.take((prefix.PrefixLength as usize + 15) / 16)
.take((prefix.PrefixLength as usize).div_ceil(16))
{
let x_word = ipv6_addr.segments()[n];
let y_word = a.segments()[n];