Skip to content

Commit aca95e9

Browse files
authored
bump msrv to 1.85 and upgrade to 2024 edition (#570)
1 parent da6bf5b commit aca95e9

34 files changed

Lines changed: 215 additions & 166 deletions

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ jobs:
232232
with:
233233
python-version: "3.14"
234234
- name: Install Rust
235-
uses: dtolnay/rust-toolchain@1.83
235+
uses: dtolnay/rust-toolchain@1.85
236236
- uses: Swatinem/rust-cache@v2
237237
with:
238238
workspaces: examples/simple

‎Cargo.toml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ authors = [
77
]
88
description = "PyO3-based Rust bindings of the NumPy C-API"
99
documentation = "https://docs.rs/numpy"
10-
edition = "2021"
11-
rust-version = "1.83"
10+
edition = "2024"
11+
rust-version = "1.85"
1212
repository = "https://github.com/PyO3/rust-numpy"
1313
categories = ["api-bindings", "development-tools::ffi", "science"]
1414
keywords = ["python", "numpy", "ffi", "pyo3"]
@@ -58,7 +58,7 @@ all-features = true
5858

5959
[lints.rust]
6060
# We usually want to make the GIL lifetime explicit.
61-
elided-lifetimes-in-paths = "deny"
61+
elided_lifetimes_in_paths = "deny"
6262

6363
[lints.clippy]
64-
needless-lifetimes = "allow"
64+
needless_lifetimes = "allow"

‎benches/array.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::{hint::black_box, ops::Range};
22

3-
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};
3+
use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main};
44
use numpy::{PyArray1, PyArray2, PyArray3};
5-
use pyo3::{types::PyAnyMethods, Bound, IntoPyObjectExt, Python};
5+
use pyo3::{Bound, IntoPyObjectExt, Python, types::PyAnyMethods};
66

77
fn extract_success(c: &mut Criterion) {
88
Python::attach(|py| {

‎benches/array_like.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use std::hint::black_box;
22

3-
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};
3+
use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main};
44
use numpy::{PyArrayLike1, PyArrayLike2, PyArrayLike3};
55
use pyo3::{
6-
types::{PyAnyMethods, PyDict},
76
Python,
7+
types::{PyAnyMethods, PyDict},
88
};
99

1010
fn extract_array_like_1(c: &mut Criterion) {

‎benches/borrow.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::hint::black_box;
22

3-
use criterion::{criterion_group, criterion_main, Criterion};
3+
use criterion::{Criterion, criterion_group, criterion_main};
44
use numpy::{PyArray, PyArrayMethods};
55
use pyo3::Python;
66

‎examples/linalg/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rust-linalg"
33
version = "0.1.0"
44
authors = ["Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>"]
5-
edition = "2021"
5+
edition = "2024"
66

77
[lib]
88
crate-type = ["cdylib"]

‎examples/linalg/src/lib.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
mod rust_linalg {
33
use ndarray_linalg::solve::Inverse;
44
use numpy::{IntoPyArray, PyArray2, PyReadonlyArray2};
5-
use pyo3::{exceptions::PyRuntimeError, pyfunction, Bound, PyResult, Python};
5+
use pyo3::{Bound, PyResult, Python, exceptions::PyRuntimeError, pyfunction};
66

77
#[pyfunction]
88
fn inv<'py>(

‎examples/parallel/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rust-parallel"
33
version = "0.1.0"
44
authors = ["Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>"]
5-
edition = "2021"
5+
edition = "2024"
66

77
[lib]
88
crate-type = ["cdylib"]

‎examples/parallel/src/lib.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ extern crate blas_src;
55
mod rust_parallel {
66
use numpy::ndarray::Zip;
77
use numpy::{IntoPyArray, PyArray1, PyReadonlyArray1, PyReadonlyArray2};
8-
use pyo3::{pyfunction, Bound, Python};
8+
use pyo3::{Bound, Python, pyfunction};
99

1010
#[pyfunction]
1111
fn rows_dot<'py>(

‎examples/simple/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rust-ext"
33
version = "0.1.0"
44
authors = ["Toshiki Teramura <toshiki.teramura@gmail.com>", "Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>"]
5-
edition = "2021"
5+
edition = "2024"
66

77
[lib]
88
crate-type = ["cdylib"]

0 commit comments

Comments
 (0)