THRIFT-5741: use rust 1.65 (#2870)

* use rust 1.65

* fix clippy

* fix alert

* fix protocol

* fix one more dereference

* fix more lint

* fix over-fix

* fix match &*server_type {
diff --git a/build/docker/README.md b/build/docker/README.md
index abf0823..9c9175f 100644
--- a/build/docker/README.md
+++ b/build/docker/README.md
@@ -191,6 +191,6 @@
 | python    | 2.7.12        | 2.7.15        |       |
 | python3   | 3.5.2         | 3.6.8         |       |
 | ruby      | 2.3.1p112     | 2.5.1p57      |       |
-| rust      | 1.61.0        | 1.61.0        |       |
+| rust      | 1.65.0        | 1.65.0        |       |
 | smalltalk |               |               | Not in CI |
 | swift     |               | 5.1.4         |       |
diff --git a/build/docker/old/ubuntu-disco/Dockerfile b/build/docker/old/ubuntu-disco/Dockerfile
index 43f4a00..d2f397a 100644
--- a/build/docker/old/ubuntu-disco/Dockerfile
+++ b/build/docker/old/ubuntu-disco/Dockerfile
@@ -254,7 +254,7 @@
       ruby-bundler
 
 # Rust dependencies
-RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.61.0 -y
+RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.65.0 -y
 ENV PATH /root/.cargo/bin:$PATH
 
 # Swift on Linux for cross tests
diff --git a/build/docker/old/ubuntu-xenial/Dockerfile b/build/docker/old/ubuntu-xenial/Dockerfile
index 7351085..37df80f 100644
--- a/build/docker/old/ubuntu-xenial/Dockerfile
+++ b/build/docker/old/ubuntu-xenial/Dockerfile
@@ -249,7 +249,7 @@
       ruby-bundler
 
 # Rust dependencies
-RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.61.0 -y
+RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.65.0 -y
 
 # Locale(s) for cpp unit tests
 RUN apt-get install -y --no-install-recommends \
diff --git a/build/docker/ubuntu-bionic/Dockerfile b/build/docker/ubuntu-bionic/Dockerfile
index 57a8aee..00c7de3 100644
--- a/build/docker/ubuntu-bionic/Dockerfile
+++ b/build/docker/ubuntu-bionic/Dockerfile
@@ -254,7 +254,7 @@
       ruby-bundler
 
 # Rust dependencies
-RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.61.0 -y
+RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.65.0 -y
 ENV PATH /root/.cargo/bin:$PATH
 
 # Swift on Linux for cross tests
diff --git a/build/docker/ubuntu-focal/Dockerfile b/build/docker/ubuntu-focal/Dockerfile
index a6121fa..1039e45 100644
--- a/build/docker/ubuntu-focal/Dockerfile
+++ b/build/docker/ubuntu-focal/Dockerfile
@@ -241,7 +241,7 @@
       ruby-bundler
 
 # Rust dependencies
-RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.61.0 -y
+RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.65.0 -y
 ENV PATH /root/.cargo/bin:$PATH
 
 # Swift on Linux for cross tests
diff --git a/build/docker/ubuntu-jammy/Dockerfile b/build/docker/ubuntu-jammy/Dockerfile
index bbb46d7..d45070f 100644
--- a/build/docker/ubuntu-jammy/Dockerfile
+++ b/build/docker/ubuntu-jammy/Dockerfile
@@ -241,7 +241,7 @@
   ruby-bundler
 
 # Rust dependencies
-RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.61.0 -y
+RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.65.0 -y
 ENV PATH /root/.cargo/bin:$PATH
 
 # Swift on Linux for cross tests