Skip to content

Commit

Permalink
Update Rust to v1.59.0
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Gould <ver@buoyant.io>
  • Loading branch information
olix0r committed Feb 25, 2022
1 parent e4cb6ec commit a14c642
Show file tree
Hide file tree
Showing 81 changed files with 152 additions and 150 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG RUST_VERSION=1.56.1
ARG RUST_VERSION=1.59.0

FROM docker.io/rust:${RUST_VERSION}-bullseye as kubectl
ARG KUBECTL_VERSION=v1.23.2
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkerd2-proxy",
"image": "ghcr.io/linkerd/dev-proxy:v7",
"image": "ghcr.io/linkerd/dev-proxy:v8",
// "dockerFile": "./Dockerfile",
"extensions": [
"matklad.rust-analyzer",
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/package/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG RUST_VERSION=1.56.1
ARG RUST_VERSION=1.59.0
ARG BASE_IMAGE=rust:${RUST_VERSION}-buster
FROM $BASE_IMAGE
WORKDIR /linkerd
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
timeout-minutes: 20
continue-on-error: true
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
timeout-minutes: 20
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
steps:
- run: |
curl --proto =https --tlsv1.3 -vsSfLo /usr/local/bin/cargo-action-fmt "https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-x86_64-unknown-linux-gnu"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-each.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
timeout-minutes: 3
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
steps:
- run: apt update && apt install -y jq
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
timeout-minutes: 20
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
strategy:
matrix:
crate: ${{ fromJson(needs.list-changed-crates.outputs.crates) }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
options: --security-opt seccomp=unconfined # 🤷
steps:
- run: apt update && apt install -y cmake clang golang # for boring
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fuzzers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
timeout-minutes: 3
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
steps:
- run: apt update && apt install -y jo
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
timeout-minutes: 40
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
strategy:
matrix:
dir: ${{ fromJson(needs.list-changed.outputs.dirs) }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
timeout-minutes: 20
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
timeout-minutes: 10
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
steps:
- run: |
curl --proto =https --tlsv1.3 -vsSfLo /usr/local/bin/cargo-action-fmt "https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-x86_64-unknown-linux-gnu"
Expand All @@ -36,7 +36,7 @@ jobs:
timeout-minutes: 10
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
steps:
- run: rustup component add rustfmt
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
Expand All @@ -46,7 +46,7 @@ jobs:
timeout-minutes: 10
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
steps:
- run: |
curl --proto =https --tlsv1.3 -vsSfLo /usr/local/bin/cargo-action-fmt "https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-x86_64-unknown-linux-gnu"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
timeout-minutes: 20
continue-on-error: true
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
timeout-minutes: 10
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
steps:
- run: apt update && apt install -y cmake clang golang # for boring
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
timeout-minutes: 10
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.1-buster
image: docker://rust:1.59.0-buster
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- run: |
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# :; docker buildx build . --load

# Please make changes via update-rust-version.sh
ARG RUST_VERSION=1.56.1
ARG RUST_VERSION=1.59.0
ARG RUST_IMAGE=rust:${RUST_VERSION}-buster

# Use an arbitrary ~recent edge release image to get the proxy
Expand Down Expand Up @@ -48,7 +48,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.56.1-buster,source=/usr/local/cargo,target=/usr/local/cargo \
--mount=type=cache,from=rust:1.59.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 --no-default-features --features="$PROXY_FEATURES") && \
Expand Down
4 changes: 2 additions & 2 deletions hyper-balance/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
4 changes: 2 additions & 2 deletions linkerd/addr/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]
use linkerd_dns_name::Name;
Expand Down
4 changes: 2 additions & 2 deletions linkerd/app/admin/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
4 changes: 2 additions & 2 deletions linkerd/app/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
4 changes: 2 additions & 2 deletions linkerd/app/gateway/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/inbound/src/http/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ impl tap::Inspect for Logical {
req.extensions()
.get::<tls::ConditionalServerTls>()
.cloned()
.unwrap_or_else(|| tls::ConditionalServerTls::None(tls::NoServerTls::Disabled))
.unwrap_or(tls::ConditionalServerTls::None(tls::NoServerTls::Disabled))
}

fn dst_addr<B>(&self, _: &http::Request<B>) -> Option<SocketAddr> {
Expand Down
4 changes: 2 additions & 2 deletions linkerd/app/inbound/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
1 change: 1 addition & 0 deletions linkerd/app/inbound/src/policy/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::collections::{HashMap, HashSet};
/// The proxy usually watches dynamic policies from the control plane, though it can also use
/// 'fixed' policies configured at startup.
#[derive(Clone, Debug)]
#[allow(clippy::large_enum_variant)]
pub enum Config {
Discover {
control: control::Config,
Expand Down
1 change: 1 addition & 0 deletions linkerd/app/integration/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub struct RouteBuilder {
}

#[derive(Debug)]
#[allow(clippy::large_enum_variant)]
enum Dst {
Call(pb::GetDestination, Result<DstReceiver, grpc::Status>),
Done,
Expand Down
4 changes: 2 additions & 2 deletions linkerd/app/integration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
4 changes: 2 additions & 2 deletions linkerd/app/outbound/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
4 changes: 2 additions & 2 deletions linkerd/app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
4 changes: 2 additions & 2 deletions linkerd/app/test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
4 changes: 2 additions & 2 deletions linkerd/cache/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
4 changes: 2 additions & 2 deletions linkerd/conditional/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
4 changes: 2 additions & 2 deletions linkerd/detect/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
4 changes: 2 additions & 2 deletions linkerd/dns/name/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down
6 changes: 3 additions & 3 deletions linkerd/dns/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type
clippy::disallowed_methods,
clippy::disallowed_types
)]
#![forbid(unsafe_code)]

Expand Down Expand Up @@ -120,7 +120,7 @@ impl Resolver {
fn srv_to_socket_addr(srv: rdata::SRV) -> Result<net::SocketAddr, InvalidSrv> {
if let Some(first_label) = srv.target().iter().next() {
if let Ok(utf8) = std::str::from_utf8(first_label) {
if let Ok(ip) = utf8.replace("-", ".").parse::<std::net::IpAddr>() {
if let Ok(ip) = utf8.replace('-', ".").parse::<std::net::IpAddr>() {
return Ok(net::SocketAddr::new(ip, srv.port()));
}
}
Expand Down
10 changes: 5 additions & 5 deletions linkerd/duplex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#![deny(
warnings,
rust_2018_idioms,
clippy::disallowed_method,
clippy::disallowed_type,
clippy::disallowed_methods,
clippy::disallowed_types,
unsafe_code
)]

Expand Down Expand Up @@ -82,13 +82,13 @@ where
type Output = io::Result<()>;

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> io::Poll<()> {
let mut this = self.project();
let this = self.project();
// This purposefully ignores the Async part, since we don't want to
// return early if the first half isn't ready, but the other half
// could make progress.
trace!("poll");
let _ = this.half_in.copy_into(&mut this.half_out, cx)?;
let _ = this.half_out.copy_into(&mut this.half_in, cx)?;
let _ = this.half_in.copy_into(this.half_out, cx)?;
let _ = this.half_out.copy_into(this.half_in, cx)?;
if this.half_in.is_done() && this.half_out.is_done() {
Poll::Ready(Ok(()))
} else {
Expand Down
Loading

0 comments on commit a14c642

Please sign in to comment.