Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

THRIFT-5819: use latest rustc version for rustlib #3045

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ jobs:
needs: compiler
runs-on: ubuntu-22.04
env:
TOOLCHAIN_VERSION: 1.65.0
TOOLCHAIN_VERSION: 1.81.0
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr
<td align=left><a href="https://github.com/apache/thrift/blob/master/lib/rs/README.md">Rust</a></td>
<!-- Since -----------------><td>0.11.0</td>
<!-- Build Systems ---------><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cred.png" alt=""/></td>
<!-- Language Levels -------><td>1.65.0</td><td>1.xx.x</td>
<!-- Language Levels -------><td>1.81.0</td><td>1.xx.x</td>
<!-- Field types -----------><td><img src="/doc/images/cred.png" alt=""/></td>
<!-- Low-Level Transports --><td><img src="/doc/images/cred.png" alt=""/></td><td><img src="/doc/images/cred.png" alt=""/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cred.png" alt=""/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cred.png" alt=""/></td>
<!-- Transport Wrappers ----><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cred.png" alt=""/></td><td><img src="/doc/images/cred.png" alt=""/></td><td><img src="/doc/images/cred.png" alt=""/></td>
Expand Down
2 changes: 1 addition & 1 deletion build/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,6 @@ Last updated: March 5, 2024
| python2 | 2.7.18 | | |
| python3 | 3.8.10 | 3.10.12 | |
| ruby | 2.7.0p0 | 3.0.2p107 | |
| rust | 1.65.0 | 1.65.0 | |
| rust | 1.81.0 | 1.81.0 | |
| smalltalk | | | Not in CI |
| swift | 5.7 | 5.7 | |
2 changes: 1 addition & 1 deletion build/docker/ubuntu-focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ RUN apt-get install -y --no-install-recommends \

USER ${user}
RUN `# Rust dependencies` \
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.65.0 -y
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.81.0 -y
ENV PATH /home/${user}/.cargo/bin:$PATH
USER root

Expand Down
2 changes: 1 addition & 1 deletion build/docker/ubuntu-jammy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ RUN apt-get install -y --no-install-recommends \

USER ${user}
RUN `# Rust dependencies` \
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.65.0 -y
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.81.0 -y
ENV PATH /home/${user}/.cargo/bin:$PATH
USER root

Expand Down
2 changes: 1 addition & 1 deletion lib/rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
//! [tutorial]: https://github.com/apache/thrift/tree/master/tutorial/rs
#![crate_type = "lib"]
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
#![doc(test(attr(allow(unused_variables, dead_code), deny(warnings))))]
#![deny(bare_trait_objects)]

// NOTE: this macro has to be defined before any modules. See:
Expand Down
4 changes: 1 addition & 3 deletions lib/rs/src/protocol/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,6 @@ fn u8_to_type(b: u8) -> crate::Result<TType> {
#[cfg(test)]
mod tests {

use std::i32;

use crate::protocol::{
TFieldIdentifier, TInputProtocol, TListIdentifier, TMapIdentifier, TMessageIdentifier,
TMessageType, TOutputProtocol, TSetIdentifier, TStructIdentifier, TType,
Expand Down Expand Up @@ -2818,7 +2816,7 @@ mod tests {
copy_write_buffer_to_read_buffer!(o_prot);

let read_double = i_prot.read_double().unwrap();
assert!(read_double - double < std::f64::EPSILON);
assert!((read_double - double).abs() < f64::EPSILON);
Copy link
Member

@Jens-G Jens-G Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤣 great catch

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion lib/rs/src/transport/framed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ where
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;
}

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.65.0
1.81.0
Loading