Skip to content

Commit

Permalink
chore: Upgrade to Rust 1.79 (#570)
Browse files Browse the repository at this point in the history
* Upgrade to Rust 1.79 and fix clippy warnings

* address feedback
  • Loading branch information
andygrove authored Jun 26, 2024
1 parent 91b14ef commit 2aa20f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/src/execution/datafusion/expressions/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ macro_rules! cast_float_to_int16_down {
.iter()
.map(|value| match value {
Some(value) => {
let is_overflow = value.is_nan() || value.abs() as i32 == std::i32::MAX;
let is_overflow = value.is_nan() || value.abs() as i32 == i32::MAX;
if is_overflow {
return Err(cast_overflow(
&format!($format_str, value).replace("e", "E"),
Expand Down Expand Up @@ -374,7 +374,7 @@ macro_rules! cast_decimal_to_int16_down {
Some(value) => {
let divisor = 10_i128.pow($scale as u32);
let (truncated, decimal) = (value / divisor, (value % divisor).abs());
let is_overflow = truncated.abs() > std::i32::MAX.into();
let is_overflow = truncated.abs() > i32::MAX.into();
if is_overflow {
return Err(cast_overflow(
&format!("{}.{}BD", truncated, decimal),
Expand Down
2 changes: 1 addition & 1 deletion core/src/jvm_bridge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ impl JVMClasses<'_> {
JVM_CLASSES.get_or_init(|| {
// A hack to make the `JNIEnv` static. It is not safe but we don't really use the
// `JNIEnv` except for creating the global references of the classes.
let env = unsafe { std::mem::transmute::<_, &'static mut JNIEnv>(env) };
let env = unsafe { std::mem::transmute::<&mut JNIEnv, &'static mut JNIEnv>(env) };

let clazz = env.find_class("java/lang/Object").unwrap();
let object_get_class_method = env
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.78
1.79

0 comments on commit 2aa20f0

Please sign in to comment.