diff --git a/.github/actions/package/Dockerfile b/.github/actions/package/Dockerfile index 44b679218e..d3d8d28f78 100644 --- a/.github/actions/package/Dockerfile +++ b/.github/actions/package/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE=rust:1.55.0-buster +ARG BASE_IMAGE=rust:1.56.0-buster FROM $BASE_IMAGE WORKDIR /linkerd RUN apt-get update && \ diff --git a/.github/workflows/advisory.yml b/.github/workflows/advisory.yml index fd1589cfe4..425900ffc0 100644 --- a/.github/workflows/advisory.yml +++ b/.github/workflows/advisory.yml @@ -24,7 +24,7 @@ jobs: timeout-minutes: 40 runs-on: ubuntu-latest container: - image: docker://rust:1.55.0-buster + image: docker://rust:1.56.0-buster permissions: contents: read strategy: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 49e4c9932e..7983d1266a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 container: - image: docker://rust:1.55.0-buster + image: docker://rust:1.56.0-buster options: --security-opt seccomp=unconfined steps: - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index dac2ffef2a..39f1aa9eed 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -24,7 +24,7 @@ jobs: timeout-minutes: 5 runs-on: ubuntu-latest container: - image: docker://rust:1.55.0-buster + image: docker://rust:1.56.0-buster permissions: contents: read steps: @@ -37,7 +37,7 @@ jobs: timeout-minutes: 20 runs-on: ubuntu-latest container: - image: docker://rust:1.55.0-buster + image: docker://rust:1.56.0-buster permissions: contents: read steps: @@ -49,7 +49,7 @@ jobs: timeout-minutes: 5 runs-on: ubuntu-latest container: - image: docker://rust:1.55.0-buster + image: docker://rust:1.56.0-buster permissions: contents: read steps: diff --git a/Dockerfile b/Dockerfile index eec73b4bc4..898c7f395f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ # :; docker buildx build . --load # Please make changes via update-rust-version.sh -ARG RUST_IMAGE=rust:1.55.0-buster +ARG RUST_IMAGE=rust:1.56.0-buster # Use an arbitrary ~recent edge release image to get the proxy # identity-initializing and linkerd-await wrappers. @@ -41,7 +41,7 @@ RUN --mount=type=cache,target=/var/lib/apt/lists \ WORKDIR /usr/src/linkerd2-proxy COPY . . RUN --mount=type=cache,target=target \ - --mount=type=cache,from=rust:1.55.0-buster,source=/usr/local/cargo,target=/usr/local/cargo \ + --mount=type=cache,from=rust:1.56.0-buster,source=/usr/local/cargo,target=/usr/local/cargo \ mkdir -p /out && \ if [ -n "$PROXY_UNOPTIMIZED" ]; then \ (cd linkerd2-proxy && /usr/bin/time -v cargo build --locked --features="$PROXY_FEATURES") && \ diff --git a/hyper-balance/Cargo.toml b/hyper-balance/Cargo.toml index 66c6fa0141..bafa6161a5 100644 --- a/hyper-balance/Cargo.toml +++ b/hyper-balance/Cargo.toml @@ -3,7 +3,7 @@ name = "hyper-balance" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/addr/Cargo.toml b/linkerd/addr/Cargo.toml index f7be77dfce..55a52b5e1d 100644 --- a/linkerd/addr/Cargo.toml +++ b/linkerd/addr/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-addr" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/addr/fuzz/Cargo.toml b/linkerd/addr/fuzz/Cargo.toml index 837355486e..264d75bfa4 100644 --- a/linkerd/addr/fuzz/Cargo.toml +++ b/linkerd/addr/fuzz/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-addr-fuzz" version = "0.0.0" authors = ["Linkerd Developers "] publish = false -edition = "2018" +edition = "2021" [package.metadata] cargo-fuzz = true diff --git a/linkerd/app/Cargo.toml b/linkerd/app/Cargo.toml index 8200c12f9f..28e49b4f7a 100644 --- a/linkerd/app/Cargo.toml +++ b/linkerd/app/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-app" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Configures and executes the proxy diff --git a/linkerd/app/admin/Cargo.toml b/linkerd/app/admin/Cargo.toml index 9fbe87c8a3..cc82039a45 100644 --- a/linkerd/app/admin/Cargo.toml +++ b/linkerd/app/admin/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-app-admin" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ The linkerd proxy's admin server. diff --git a/linkerd/app/admin/src/server/mod.rs b/linkerd/app/admin/src/server.rs similarity index 99% rename from linkerd/app/admin/src/server/mod.rs rename to linkerd/app/admin/src/server.rs index 9faf54c717..eb26442fb3 100644 --- a/linkerd/app/admin/src/server/mod.rs +++ b/linkerd/app/admin/src/server.rs @@ -224,7 +224,7 @@ mod tests { .unwrap(); let f = admin.clone().oneshot(r); timeout(TIMEOUT, f).await.expect("timeout").expect("call") - };}; + }}; } assert_eq!(call!().status(), StatusCode::SERVICE_UNAVAILABLE); diff --git a/linkerd/app/core/Cargo.toml b/linkerd/app/core/Cargo.toml index 18db691afb..c06036be4b 100644 --- a/linkerd/app/core/Cargo.toml +++ b/linkerd/app/core/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-app-core" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Core infrastructure for the proxy application diff --git a/linkerd/app/core/src/errors/mod.rs b/linkerd/app/core/src/errors.rs similarity index 100% rename from linkerd/app/core/src/errors/mod.rs rename to linkerd/app/core/src/errors.rs diff --git a/linkerd/app/core/src/metrics/mod.rs b/linkerd/app/core/src/metrics.rs similarity index 100% rename from linkerd/app/core/src/metrics/mod.rs rename to linkerd/app/core/src/metrics.rs diff --git a/linkerd/app/core/src/proxy/mod.rs b/linkerd/app/core/src/proxy.rs similarity index 100% rename from linkerd/app/core/src/proxy/mod.rs rename to linkerd/app/core/src/proxy.rs diff --git a/linkerd/app/core/src/telemetry/mod.rs b/linkerd/app/core/src/telemetry.rs similarity index 100% rename from linkerd/app/core/src/telemetry/mod.rs rename to linkerd/app/core/src/telemetry.rs diff --git a/linkerd/app/core/src/transport/mod.rs b/linkerd/app/core/src/transport.rs similarity index 100% rename from linkerd/app/core/src/transport/mod.rs rename to linkerd/app/core/src/transport.rs diff --git a/linkerd/app/gateway/Cargo.toml b/linkerd/app/gateway/Cargo.toml index de01dd2e6a..9ccd962f0c 100644 --- a/linkerd/app/gateway/Cargo.toml +++ b/linkerd/app/gateway/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-app-gateway" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/app/gateway/src/lib.rs b/linkerd/app/gateway/src/lib.rs index 6c45d56f56..7089c73548 100644 --- a/linkerd/app/gateway/src/lib.rs +++ b/linkerd/app/gateway/src/lib.rs @@ -26,7 +26,7 @@ use linkerd_app_inbound::{ policy, Inbound, }; use linkerd_app_outbound::{self as outbound, Outbound}; -use std::{convert::TryInto, fmt}; +use std::fmt; use thiserror::Error; use tracing::debug_span; diff --git a/linkerd/app/inbound/Cargo.toml b/linkerd/app/inbound/Cargo.toml index 14b7bda181..b5fce49035 100644 --- a/linkerd/app/inbound/Cargo.toml +++ b/linkerd/app/inbound/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-app-inbound" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Configures and runs the inbound proxy diff --git a/linkerd/app/inbound/fuzz/Cargo.toml b/linkerd/app/inbound/fuzz/Cargo.toml index 170afb67f0..4da445a925 100644 --- a/linkerd/app/inbound/fuzz/Cargo.toml +++ b/linkerd/app/inbound/fuzz/Cargo.toml @@ -4,7 +4,7 @@ name = "linkerd-app-inbound-fuzz" version = "0.0.0" authors = ["Automatically generated"] publish = false -edition = "2018" +edition = "2021" [package.metadata] cargo-fuzz = true diff --git a/linkerd/app/inbound/src/http/mod.rs b/linkerd/app/inbound/src/http.rs similarity index 100% rename from linkerd/app/inbound/src/http/mod.rs rename to linkerd/app/inbound/src/http.rs diff --git a/linkerd/app/inbound/src/http/router.rs b/linkerd/app/inbound/src/http/router.rs index 961fcbd771..89a08c3108 100644 --- a/linkerd/app/inbound/src/http/router.rs +++ b/linkerd/app/inbound/src/http/router.rs @@ -278,7 +278,7 @@ impl svc::stack::RecognizeRoute> for LogicalPerRequest { use linkerd_app_core::{ http_request_authority_addr, http_request_host_addr, CANONICAL_DST_HEADER, }; - use std::{convert::TryInto, str::FromStr}; + use std::str::FromStr; // Try to read a logical named address from the request. First check the canonical-dst // header as set by the client proxy; otherwise fallback to the request's `:authority` or diff --git a/linkerd/app/inbound/src/metrics/mod.rs b/linkerd/app/inbound/src/metrics.rs similarity index 100% rename from linkerd/app/inbound/src/metrics/mod.rs rename to linkerd/app/inbound/src/metrics.rs diff --git a/linkerd/app/inbound/src/metrics/error/mod.rs b/linkerd/app/inbound/src/metrics/error.rs similarity index 100% rename from linkerd/app/inbound/src/metrics/error/mod.rs rename to linkerd/app/inbound/src/metrics/error.rs diff --git a/linkerd/app/inbound/src/policy/mod.rs b/linkerd/app/inbound/src/policy.rs similarity index 100% rename from linkerd/app/inbound/src/policy/mod.rs rename to linkerd/app/inbound/src/policy.rs diff --git a/linkerd/app/inbound/src/policy/authorize/mod.rs b/linkerd/app/inbound/src/policy/authorize.rs similarity index 100% rename from linkerd/app/inbound/src/policy/authorize/mod.rs rename to linkerd/app/inbound/src/policy/authorize.rs diff --git a/linkerd/app/inbound/src/policy/discover.rs b/linkerd/app/inbound/src/policy/discover.rs index 4bd242eeba..c8f5f1b5de 100644 --- a/linkerd/app/inbound/src/policy/discover.rs +++ b/linkerd/app/inbound/src/policy/discover.rs @@ -12,7 +12,7 @@ use linkerd_server_policy::{ Authentication, Authorization, Network, Protocol, ServerPolicy, Suffix, }; use linkerd_tonic_watch::StreamWatch; -use std::{convert::TryInto, net::IpAddr}; +use std::net::IpAddr; #[derive(Clone, Debug)] pub(super) struct Discover { diff --git a/linkerd/app/integration/Cargo.toml b/linkerd/app/integration/Cargo.toml index 9dec0674f1..a0e5772153 100644 --- a/linkerd/app/integration/Cargo.toml +++ b/linkerd/app/integration/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-app-integration" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Proxy integration tests diff --git a/linkerd/app/integration/src/tests/mod.rs b/linkerd/app/integration/src/tests.rs similarity index 100% rename from linkerd/app/integration/src/tests/mod.rs rename to linkerd/app/integration/src/tests.rs diff --git a/linkerd/app/integration/src/tests/telemetry/mod.rs b/linkerd/app/integration/src/tests/telemetry.rs similarity index 100% rename from linkerd/app/integration/src/tests/telemetry/mod.rs rename to linkerd/app/integration/src/tests/telemetry.rs diff --git a/linkerd/app/outbound/Cargo.toml b/linkerd/app/outbound/Cargo.toml index 36c38c37f7..6f481cee90 100644 --- a/linkerd/app/outbound/Cargo.toml +++ b/linkerd/app/outbound/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-app-outbound" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Configures and runs the outbound proxy diff --git a/linkerd/app/outbound/src/http/mod.rs b/linkerd/app/outbound/src/http.rs similarity index 100% rename from linkerd/app/outbound/src/http/mod.rs rename to linkerd/app/outbound/src/http.rs diff --git a/linkerd/app/outbound/src/metrics/mod.rs b/linkerd/app/outbound/src/metrics.rs similarity index 100% rename from linkerd/app/outbound/src/metrics/mod.rs rename to linkerd/app/outbound/src/metrics.rs diff --git a/linkerd/app/outbound/src/metrics/error/mod.rs b/linkerd/app/outbound/src/metrics/error.rs similarity index 100% rename from linkerd/app/outbound/src/metrics/error/mod.rs rename to linkerd/app/outbound/src/metrics/error.rs diff --git a/linkerd/app/outbound/src/tcp/mod.rs b/linkerd/app/outbound/src/tcp.rs similarity index 100% rename from linkerd/app/outbound/src/tcp/mod.rs rename to linkerd/app/outbound/src/tcp.rs diff --git a/linkerd/app/test/Cargo.toml b/linkerd/app/test/Cargo.toml index 3138ff4725..e9b3b0e421 100644 --- a/linkerd/app/test/Cargo.toml +++ b/linkerd/app/test/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-app-test" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Proxy integration tests diff --git a/linkerd/cache/Cargo.toml b/linkerd/cache/Cargo.toml index 759fced3b0..4d06991430 100644 --- a/linkerd/cache/Cargo.toml +++ b/linkerd/cache/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-cache" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/conditional/Cargo.toml b/linkerd/conditional/Cargo.toml index 0c1e892c74..6eb902949d 100644 --- a/linkerd/conditional/Cargo.toml +++ b/linkerd/conditional/Cargo.toml @@ -3,6 +3,6 @@ name = "linkerd-conditional" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" [dependencies] diff --git a/linkerd/detect/Cargo.toml b/linkerd/detect/Cargo.toml index fe713f3f77..a0e06289ed 100644 --- a/linkerd/detect/Cargo.toml +++ b/linkerd/detect/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-detect" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/dns/Cargo.toml b/linkerd/dns/Cargo.toml index ebe5670bdd..50d13cbec2 100644 --- a/linkerd/dns/Cargo.toml +++ b/linkerd/dns/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-dns" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/dns/fuzz/Cargo.toml b/linkerd/dns/fuzz/Cargo.toml index 54a5402e6a..ba7c3b641e 100644 --- a/linkerd/dns/fuzz/Cargo.toml +++ b/linkerd/dns/fuzz/Cargo.toml @@ -4,7 +4,7 @@ name = "linkerd-dns-fuzz" version = "0.0.0" authors = ["Linkerd Developers "] publish = false -edition = "2018" +edition = "2021" [package.metadata] cargo-fuzz = true diff --git a/linkerd/dns/name/Cargo.toml b/linkerd/dns/name/Cargo.toml index 0a9bbb3c43..a45068f034 100644 --- a/linkerd/dns/name/Cargo.toml +++ b/linkerd/dns/name/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-dns-name" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/duplex/Cargo.toml b/linkerd/duplex/Cargo.toml index 9e97573bb9..628de4d3ee 100644 --- a/linkerd/duplex/Cargo.toml +++ b/linkerd/duplex/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-duplex" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/errno/Cargo.toml b/linkerd/errno/Cargo.toml index 7edc5d5dfd..3990cb47e1 100644 --- a/linkerd/errno/Cargo.toml +++ b/linkerd/errno/Cargo.toml @@ -3,5 +3,5 @@ name = "linkerd-errno" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false diff --git a/linkerd/error-respond/Cargo.toml b/linkerd/error-respond/Cargo.toml index 8f3934924d..a2f6f8c26a 100644 --- a/linkerd/error-respond/Cargo.toml +++ b/linkerd/error-respond/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-error-respond" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false diff --git a/linkerd/error/Cargo.toml b/linkerd/error/Cargo.toml index 30e6e8ce0c..a556d848ce 100644 --- a/linkerd/error/Cargo.toml +++ b/linkerd/error/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-error" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/exp-backoff/Cargo.toml b/linkerd/exp-backoff/Cargo.toml index 29497e4011..c332c83a20 100644 --- a/linkerd/exp-backoff/Cargo.toml +++ b/linkerd/exp-backoff/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-exp-backoff" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false diff --git a/linkerd/http-box/Cargo.toml b/linkerd/http-box/Cargo.toml index 079bbf2bbc..d844a1f675 100644 --- a/linkerd/http-box/Cargo.toml +++ b/linkerd/http-box/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-http-box" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/http-classify/Cargo.toml b/linkerd/http-classify/Cargo.toml index bcc2c8094d..0cb4fd038f 100644 --- a/linkerd/http-classify/Cargo.toml +++ b/linkerd/http-classify/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-http-classify" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/http-metrics/Cargo.toml b/linkerd/http-metrics/Cargo.toml index 2f07ff6bb4..f5f5b454f3 100644 --- a/linkerd/http-metrics/Cargo.toml +++ b/linkerd/http-metrics/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-http-metrics" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/http-metrics/src/requests/mod.rs b/linkerd/http-metrics/src/requests.rs similarity index 100% rename from linkerd/http-metrics/src/requests/mod.rs rename to linkerd/http-metrics/src/requests.rs diff --git a/linkerd/http-retry/Cargo.toml b/linkerd/http-retry/Cargo.toml index 6b219908ba..6d11692799 100644 --- a/linkerd/http-retry/Cargo.toml +++ b/linkerd/http-retry/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-http-retry" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/identity/Cargo.toml b/linkerd/identity/Cargo.toml index 5ae5915822..812629bdb1 100644 --- a/linkerd/identity/Cargo.toml +++ b/linkerd/identity/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-identity" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/io/Cargo.toml b/linkerd/io/Cargo.toml index 4e9ab36fa1..5ac52ff8d9 100644 --- a/linkerd/io/Cargo.toml +++ b/linkerd/io/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-io" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ General I/O primitives. diff --git a/linkerd/metrics/Cargo.toml b/linkerd/metrics/Cargo.toml index 4ea291e327..8497ec88cf 100644 --- a/linkerd/metrics/Cargo.toml +++ b/linkerd/metrics/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-metrics" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [features] diff --git a/linkerd/metrics/src/latency.rs b/linkerd/metrics/src/latency.rs index 49788fe94c..23b6bde595 100644 --- a/linkerd/metrics/src/latency.rs +++ b/linkerd/metrics/src/latency.rs @@ -44,7 +44,6 @@ pub struct Us(Duration); impl From for u64 { fn from(Us(us): Us) -> u64 { - use std::convert::TryInto; us.as_micros().try_into().unwrap_or_else(|_| { // These measurements should never be long enough to overflow tracing::warn!("Duration::as_micros would overflow u64"); diff --git a/linkerd/opencensus/Cargo.toml b/linkerd/opencensus/Cargo.toml index 2775e8a9c5..3632d52d44 100644 --- a/linkerd/opencensus/Cargo.toml +++ b/linkerd/opencensus/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-opencensus" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/proxy/api-resolve/Cargo.toml b/linkerd/proxy/api-resolve/Cargo.toml index 641792387e..78928dc942 100644 --- a/linkerd/proxy/api-resolve/Cargo.toml +++ b/linkerd/proxy/api-resolve/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-proxy-api-resolve" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Implements the Resolve trait using the proxy's gRPC API diff --git a/linkerd/proxy/core/Cargo.toml b/linkerd/proxy/core/Cargo.toml index 9e39d241c4..9be75cb857 100644 --- a/linkerd/proxy/core/Cargo.toml +++ b/linkerd/proxy/core/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-proxy-core" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Core interfaces needed to implement proxy components diff --git a/linkerd/proxy/discover/Cargo.toml b/linkerd/proxy/discover/Cargo.toml index 2d8a7045a1..e298527e71 100644 --- a/linkerd/proxy/discover/Cargo.toml +++ b/linkerd/proxy/discover/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-proxy-discover" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Utilities to implement a Discover with the core Resolve type diff --git a/linkerd/proxy/dns-resolve/Cargo.toml b/linkerd/proxy/dns-resolve/Cargo.toml index 92ac0a5c11..7e7df97eb0 100644 --- a/linkerd/proxy/dns-resolve/Cargo.toml +++ b/linkerd/proxy/dns-resolve/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-proxy-dns-resolve" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Service Dns Resolutions for the proxy diff --git a/linkerd/proxy/http/Cargo.toml b/linkerd/proxy/http/Cargo.toml index a297a0cfcb..77844577a5 100644 --- a/linkerd/proxy/http/Cargo.toml +++ b/linkerd/proxy/http/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-proxy-http" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ HTTP-specific implementations that rely on other proxy infrastructure diff --git a/linkerd/proxy/http/fuzz/Cargo.toml b/linkerd/proxy/http/fuzz/Cargo.toml index d9ae834f2d..d7970588e8 100644 --- a/linkerd/proxy/http/fuzz/Cargo.toml +++ b/linkerd/proxy/http/fuzz/Cargo.toml @@ -4,7 +4,7 @@ name = "linkerd-proxy-http-fuzz" version = "0.0.0" authors = ["Linkerd Developers "] publish = false -edition = "2018" +edition = "2021" [package.metadata] cargo-fuzz = true diff --git a/linkerd/proxy/identity/Cargo.toml b/linkerd/proxy/identity/Cargo.toml index 92770b88bc..703360c992 100644 --- a/linkerd/proxy/identity/Cargo.toml +++ b/linkerd/proxy/identity/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-proxy-identity" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [features] diff --git a/linkerd/proxy/resolve/Cargo.toml b/linkerd/proxy/resolve/Cargo.toml index 510c4cb2ea..dcea487e0e 100644 --- a/linkerd/proxy/resolve/Cargo.toml +++ b/linkerd/proxy/resolve/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-proxy-resolve" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Utilities for working with `Resolve` implementations diff --git a/linkerd/proxy/tap/Cargo.toml b/linkerd/proxy/tap/Cargo.toml index d64daa6444..dccaf07a59 100644 --- a/linkerd/proxy/tap/Cargo.toml +++ b/linkerd/proxy/tap/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-proxy-tap" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [features] diff --git a/linkerd/proxy/tap/src/grpc/mod.rs b/linkerd/proxy/tap/src/grpc.rs similarity index 100% rename from linkerd/proxy/tap/src/grpc/mod.rs rename to linkerd/proxy/tap/src/grpc.rs diff --git a/linkerd/proxy/tap/src/grpc/match_.rs b/linkerd/proxy/tap/src/grpc/match_.rs index b2e4d65eeb..bbeac44c45 100644 --- a/linkerd/proxy/tap/src/grpc/match_.rs +++ b/linkerd/proxy/tap/src/grpc/match_.rs @@ -2,13 +2,7 @@ use crate::Inspect; use ipnet::{Ipv4Net, Ipv6Net}; use linkerd2_proxy_api::net::ip_address; use linkerd2_proxy_api::tap::observe_request; -use std::{ - boxed::Box, - collections::BTreeMap, - convert::{TryFrom, TryInto}, - net, - str::FromStr, -}; +use std::{boxed::Box, collections::BTreeMap, net, str::FromStr}; use thiserror::Error; #[derive(Clone, Debug)] diff --git a/linkerd/proxy/tcp/Cargo.toml b/linkerd/proxy/tcp/Cargo.toml index 27f2196561..4979d9d891 100644 --- a/linkerd/proxy/tcp/Cargo.toml +++ b/linkerd/proxy/tcp/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-proxy-tcp" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false diff --git a/linkerd/proxy/transport/Cargo.toml b/linkerd/proxy/transport/Cargo.toml index 245470384d..a9fe5f409a 100644 --- a/linkerd/proxy/transport/Cargo.toml +++ b/linkerd/proxy/transport/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-proxy-transport" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Transport-level implementations that rely on core proxy infrastructure diff --git a/linkerd/reconnect/Cargo.toml b/linkerd/reconnect/Cargo.toml index 934efed7c2..3a0c6b0e5d 100644 --- a/linkerd/reconnect/Cargo.toml +++ b/linkerd/reconnect/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-reconnect" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/retry/Cargo.toml b/linkerd/retry/Cargo.toml index 3d8af52e1b..792b8cb75c 100644 --- a/linkerd/retry/Cargo.toml +++ b/linkerd/retry/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-retry" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/server-policy/Cargo.toml b/linkerd/server-policy/Cargo.toml index 14fc0e91b6..42f78b0f7e 100644 --- a/linkerd/server-policy/Cargo.toml +++ b/linkerd/server-policy/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-server-policy" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/service-profiles/Cargo.toml b/linkerd/service-profiles/Cargo.toml index 7b84a241da..d25fe1fbdb 100644 --- a/linkerd/service-profiles/Cargo.toml +++ b/linkerd/service-profiles/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-service-profiles" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Implements client layers for Linkerd ServiceProfiles. diff --git a/linkerd/service-profiles/src/http/mod.rs b/linkerd/service-profiles/src/http.rs similarity index 100% rename from linkerd/service-profiles/src/http/mod.rs rename to linkerd/service-profiles/src/http.rs diff --git a/linkerd/service-profiles/src/proto.rs b/linkerd/service-profiles/src/proto.rs index 99f1572da6..d0c82b416a 100644 --- a/linkerd/service-profiles/src/proto.rs +++ b/linkerd/service-profiles/src/proto.rs @@ -4,7 +4,7 @@ use linkerd_addr::NameAddr; use linkerd_dns_name::Name; use linkerd_proxy_api_resolve::pb as resolve; use regex::Regex; -use std::{convert::TryInto, str::FromStr, sync::Arc, time::Duration}; +use std::{str::FromStr, sync::Arc, time::Duration}; use tower::retry::budget::Budget; use tracing::warn; diff --git a/linkerd/signal/Cargo.toml b/linkerd/signal/Cargo.toml index a74ab722db..fac604deb8 100644 --- a/linkerd/signal/Cargo.toml +++ b/linkerd/signal/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-signal" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/stack/Cargo.toml b/linkerd/stack/Cargo.toml index c6157aa406..8d31ab517f 100644 --- a/linkerd/stack/Cargo.toml +++ b/linkerd/stack/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-stack" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Utilities for composing Tower services. diff --git a/linkerd/stack/metrics/Cargo.toml b/linkerd/stack/metrics/Cargo.toml index 93fc575fc8..2bc00530d2 100644 --- a/linkerd/stack/metrics/Cargo.toml +++ b/linkerd/stack/metrics/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-stack-metrics" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/stack/tracing/Cargo.toml b/linkerd/stack/tracing/Cargo.toml index d4b5fcbf68..3ba457b4b8 100644 --- a/linkerd/stack/tracing/Cargo.toml +++ b/linkerd/stack/tracing/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-stack-tracing" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/system/Cargo.toml b/linkerd/system/Cargo.toml index 1d0c2dff37..4692de68f2 100644 --- a/linkerd/system/Cargo.toml +++ b/linkerd/system/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-system" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Unsafe code for accessing system-level counters for memory & CPU usage. diff --git a/linkerd/tls/Cargo.toml b/linkerd/tls/Cargo.toml index 2ef68a3506..e7ade011c8 100644 --- a/linkerd/tls/Cargo.toml +++ b/linkerd/tls/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-tls" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/tls/fuzz/Cargo.toml b/linkerd/tls/fuzz/Cargo.toml index 23ff35bba4..2ad7dad215 100644 --- a/linkerd/tls/fuzz/Cargo.toml +++ b/linkerd/tls/fuzz/Cargo.toml @@ -4,7 +4,7 @@ name = "linkerd-tls-fuzz" version = "0.0.0" authors = ["Linkerd Developers "] publish = false -edition = "2018" +edition = "2021" [package.metadata] cargo-fuzz = true diff --git a/linkerd/tls/src/server/mod.rs b/linkerd/tls/src/server.rs similarity index 98% rename from linkerd/tls/src/server/mod.rs rename to linkerd/tls/src/server.rs index b82c79d31a..57e66aea5c 100644 --- a/linkerd/tls/src/server/mod.rs +++ b/linkerd/tls/src/server.rs @@ -306,13 +306,13 @@ mod tests { let _trace = linkerd_tracing::test::trace_init(); let (mut client_io, server_io) = tokio::io::duplex(1024); - let input = include_bytes!("testdata/curl-example-com-client-hello.bin"); + let input = include_bytes!("server/testdata/curl-example-com-client-hello.bin"); let len = input.len(); let client_task = tokio::spawn(async move { client_io .write_all(&*input) .await - .expect("Write must suceed"); + .expect("Write must succeed"); }); let (sni, io) = detect_sni(server_io) diff --git a/linkerd/tonic-watch/Cargo.toml b/linkerd/tonic-watch/Cargo.toml index 0dfcfcf54a..c9a5e37010 100644 --- a/linkerd/tonic-watch/Cargo.toml +++ b/linkerd/tonic-watch/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-tonic-watch" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ Provides a utility for creating robust watches from a service that returns a stream. diff --git a/linkerd/trace-context/Cargo.toml b/linkerd/trace-context/Cargo.toml index 0034308431..a8304484d8 100644 --- a/linkerd/trace-context/Cargo.toml +++ b/linkerd/trace-context/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-trace-context" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/trace-context/src/propagation.rs b/linkerd/trace-context/src/propagation.rs index dc4c0894b9..042ff3562e 100644 --- a/linkerd/trace-context/src/propagation.rs +++ b/linkerd/trace-context/src/propagation.rs @@ -3,7 +3,6 @@ use bytes::Bytes; use http::header::HeaderValue; use linkerd_error::Error; use rand::thread_rng; -use std::convert::TryInto; use thiserror::Error; use tracing::{trace, warn}; diff --git a/linkerd/tracing/Cargo.toml b/linkerd/tracing/Cargo.toml index 80b4bb64b9..143919c146 100644 --- a/linkerd/tracing/Cargo.toml +++ b/linkerd/tracing/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-tracing" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [features] diff --git a/linkerd/transport-header/Cargo.toml b/linkerd/transport-header/Cargo.toml index c36b7a0d8d..040ca8e13b 100644 --- a/linkerd/transport-header/Cargo.toml +++ b/linkerd/transport-header/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-transport-header" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/linkerd/transport-header/fuzz/Cargo.toml b/linkerd/transport-header/fuzz/Cargo.toml index f1bd76a966..d78ab8421d 100644 --- a/linkerd/transport-header/fuzz/Cargo.toml +++ b/linkerd/transport-header/fuzz/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-transport-header-fuzz" version = "0.0.0" authors = ["Linkerd Developers "] publish = false -edition = "2018" +edition = "2021" [package.metadata] cargo-fuzz = true diff --git a/linkerd/transport-metrics/Cargo.toml b/linkerd/transport-metrics/Cargo.toml index 3a8d7f26c5..3a18433874 100644 --- a/linkerd/transport-metrics/Cargo.toml +++ b/linkerd/transport-metrics/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd-transport-metrics" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """Transport-level metrics""" diff --git a/linkerd2-proxy/Cargo.toml b/linkerd2-proxy/Cargo.toml index f8007510af..b34d390403 100644 --- a/linkerd2-proxy/Cargo.toml +++ b/linkerd2-proxy/Cargo.toml @@ -3,7 +3,7 @@ name = "linkerd2-proxy" version = "0.1.0" authors = ["Linkerd Developers "] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = "The main proxy executable" diff --git a/opencensus-proto/Cargo.toml b/opencensus-proto/Cargo.toml index c5ff0f3db4..27c03b03bc 100644 --- a/opencensus-proto/Cargo.toml +++ b/opencensus-proto/Cargo.toml @@ -3,7 +3,7 @@ name = "opencensus-proto" version = "0.1.0" authors = ["The OpenCensus Authors"] license = "Apache-2.0" -edition = "2018" +edition = "2021" publish = false description = """ gRPC bindings for OpenCensus. diff --git a/rust-toolchain b/rust-toolchain index 094d6ad00c..3ebf789f5a 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.55.0 +1.56.0