From fd21b19a5b57d173723ecf84e8b9216dfad359cd Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Mon, 28 Aug 2023 13:35:32 -0700 Subject: [PATCH] chore(deps): Bump MSRV to 1.70.0 (#18394) * chore(deps): Bump MSRV to 1.70.0 We have a couple of dependency updates that require it (clap and rmpv). I'd still like to define an official MSRV support policy for Vector, but in absence of that, I figured I'd bump to not block the dependency updates. The only real downside is users trying to build Vector on systems where they only have access to older versions of Rust; which seems to be fairly rare currently. Signed-off-by: Jesse Szwedko * clippy Signed-off-by: Jesse Szwedko --------- Signed-off-by: Jesse Szwedko --- Cargo.toml | 2 +- src/sinks/prometheus/exporter.rs | 2 +- src/sinks/statsd/config.rs | 2 +- src/sinks/util/service/net/udp.rs | 2 +- src/sinks/util/udp.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2a70092763c21..e11526a1675b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ publish = false default-run = "vector" autobenches = false # our benchmarks are not runnable on their own either way # Minimum supported rust version -rust-version = "1.66.0" +rust-version = "1.70.0" [[bin]] name = "vector" diff --git a/src/sinks/prometheus/exporter.rs b/src/sinks/prometheus/exporter.rs index 9ba90c8fb1610..e86a3f2d64b07 100644 --- a/src/sinks/prometheus/exporter.rs +++ b/src/sinks/prometheus/exporter.rs @@ -167,7 +167,7 @@ impl Default for PrometheusExporterConfig { } } -fn default_address() -> SocketAddr { +const fn default_address() -> SocketAddr { use std::net::{IpAddr, Ipv4Addr}; SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 9598) diff --git a/src/sinks/statsd/config.rs b/src/sinks/statsd/config.rs index 340daa247c4dc..2788291278d07 100644 --- a/src/sinks/statsd/config.rs +++ b/src/sinks/statsd/config.rs @@ -99,7 +99,7 @@ impl Mode { } } -fn default_address() -> SocketAddr { +const fn default_address() -> SocketAddr { SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8125) } diff --git a/src/sinks/util/service/net/udp.rs b/src/sinks/util/service/net/udp.rs index d2655a409b008..008e58c30db50 100644 --- a/src/sinks/util/service/net/udp.rs +++ b/src/sinks/util/service/net/udp.rs @@ -75,7 +75,7 @@ impl UdpConnector { } } -fn find_bind_address(remote_addr: &SocketAddr) -> SocketAddr { +const fn find_bind_address(remote_addr: &SocketAddr) -> SocketAddr { match remote_addr { SocketAddr::V4(_) => SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), 0), SocketAddr::V6(_) => SocketAddr::new(IpAddr::V6(Ipv6Addr::UNSPECIFIED), 0), diff --git a/src/sinks/util/udp.rs b/src/sinks/util/udp.rs index 890f2f10d0154..e325024fffbb5 100644 --- a/src/sinks/util/udp.rs +++ b/src/sinks/util/udp.rs @@ -248,7 +248,7 @@ async fn udp_send(socket: &mut UdpSocket, buf: &[u8]) -> tokio::io::Result<()> { Ok(()) } -fn find_bind_address(remote_addr: &SocketAddr) -> SocketAddr { +const fn find_bind_address(remote_addr: &SocketAddr) -> SocketAddr { match remote_addr { SocketAddr::V4(_) => SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), 0), SocketAddr::V6(_) => SocketAddr::new(IpAddr::V6(Ipv6Addr::UNSPECIFIED), 0),