THRIFT-5819: use latest rustc version for rustlib (#3085)

Client: rust

This upgrades the version of rust in the rust-toolchain file, docs and dockerfiles. Doing so requires a few changes to the source, mainly to fix or silence new warnings.

Submitted on behalf of a third-party: Jiayu Liu
Derived from the following PR: https://github.com/apache/thrift/pull/3045

Co-authored-by: Jiayu Liu <jiayu@hey.com>
diff --git a/lib/rs/src/transport/framed.rs b/lib/rs/src/transport/framed.rs
index c30ccd9..d8a7448 100644
--- a/lib/rs/src/transport/framed.rs
+++ b/lib/rs/src/transport/framed.rs
@@ -97,7 +97,7 @@
             self.buf.resize(buf_capacity, 0);
 
             self.chan.read_exact(&mut self.buf[..message_size])?;
-            self.cap = message_size as usize;
+            self.cap = message_size;
             self.pos = 0;
         }