You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by pa...@apache.org on 2026/09/14 03:03:53 UTC
(sedona-db) branch main updated: chore(c/sedona-s2geography): migrate to Rust 2024 edition (#1270)
This is an automated email from the ASF dual-hosted git repository.
paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sedona-db.git
The following commit(s) were added to refs/heads/main by this push:
new a8e76f0f2 chore(c/sedona-s2geography): migrate to Rust 2024 edition (#1270)
a8e76f0f2 is described below
commit a8e76f0f26ea167f0e12dba003cb02b61fc56d55
Author: Dewey Dunnington <de...@dunnington.ca>
AuthorDate: Sun Sep 13 22:03:47 2026 -0500
chore(c/sedona-s2geography): migrate to Rust 2024 edition (#1270)
---
c/sedona-s2geography/Cargo.toml | 2 +-
c/sedona-s2geography/benches/s2geography-functions.rs | 4 ++--
c/sedona-s2geography/src/operator.rs | 14 ++++++++------
c/sedona-s2geography/tests/bounding_functions.rs | 2 +-
4 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/c/sedona-s2geography/Cargo.toml b/c/sedona-s2geography/Cargo.toml
index f2b61d131..5583c38db 100644
--- a/c/sedona-s2geography/Cargo.toml
+++ b/c/sedona-s2geography/Cargo.toml
@@ -25,7 +25,7 @@ homepage.workspace = true
repository.workspace = true
description.workspace = true
readme.workspace = true
-edition.workspace = true
+edition = "2024"
rust-version.workspace = true
[build-dependencies]
diff --git a/c/sedona-s2geography/benches/s2geography-functions.rs b/c/sedona-s2geography/benches/s2geography-functions.rs
index d7dfef5b2..f9736af1f 100644
--- a/c/sedona-s2geography/benches/s2geography-functions.rs
+++ b/c/sedona-s2geography/benches/s2geography-functions.rs
@@ -16,14 +16,14 @@
// under the License.
use std::sync::Arc;
-use criterion::{criterion_group, criterion_main, Criterion};
+use criterion::{Criterion, criterion_group, criterion_main};
use datafusion_expr::ScalarUDF;
use sedona_expr::{
function_set::FunctionSet,
scalar_udf::{SedonaScalarUDF, SimpleSedonaScalarKernel},
};
use sedona_schema::{datatypes::WKB_GEOGRAPHY, matchers::ArgMatcher};
-use sedona_testing::benchmark_util::{benchmark, BenchmarkArgSpec::*, BenchmarkArgs};
+use sedona_testing::benchmark_util::{BenchmarkArgSpec::*, BenchmarkArgs, benchmark};
fn criterion_benchmark(c: &mut Criterion) {
let mut f = FunctionSet::new();
diff --git a/c/sedona-s2geography/src/operator.rs b/c/sedona-s2geography/src/operator.rs
index fc99d4b5e..8a6385d95 100644
--- a/c/sedona-s2geography/src/operator.rs
+++ b/c/sedona-s2geography/src/operator.rs
@@ -226,11 +226,13 @@ mod tests {
let mut op = Op::new(OpType::DWithin);
assert_eq!(op.name(), "distance_within");
- assert!(!op
- .eval_binary_distance_predicate(&geog1, &geog2, 100000.0)
- .unwrap());
- assert!(op
- .eval_binary_distance_predicate(&geog1, &geog2, 200000.0)
- .unwrap());
+ assert!(
+ !op.eval_binary_distance_predicate(&geog1, &geog2, 100000.0)
+ .unwrap()
+ );
+ assert!(
+ op.eval_binary_distance_predicate(&geog1, &geog2, 200000.0)
+ .unwrap()
+ );
}
}
diff --git a/c/sedona-s2geography/tests/bounding_functions.rs b/c/sedona-s2geography/tests/bounding_functions.rs
index fdd8ca51e..bd06a5f49 100644
--- a/c/sedona-s2geography/tests/bounding_functions.rs
+++ b/c/sedona-s2geography/tests/bounding_functions.rs
@@ -145,7 +145,7 @@ mod st_envelope {
}
mod st_xy_minmax {
- use arrow_array::{create_array, ArrayRef};
+ use arrow_array::{ArrayRef, create_array};
use arrow_schema::DataType;
use datafusion_common::ScalarValue;
use rstest::rstest;