Skip to content

Commit 4fb198f

Browse files
authored
Merge pull request #240 from adamreichold/bump-cfg-if
Bump dependency on cfg-if
2 parents 68e20e6 + c91e2dc commit 4fb198f

File tree

6 files changed

+13
-20
lines changed

6 files changed

+13
-20
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
uses: actions-rs/toolchain@v1
8585
with:
8686
profile: minimal
87-
toolchain: 1.41.1
87+
toolchain: 1.48.0
8888
default: true
8989
- name: Install maturin, poetry, and toml
9090
run: pip install maturin poetry toml

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ authors = [
88
description = "Rust binding of NumPy C-API"
99
documentation = "https://pyo3.github.io/rust-numpy/numpy"
1010
edition = "2018"
11+
rust-version = "1.48"
1112
repository = "https://github.com/PyO3/rust-numpy"
1213
keywords = ["numpy", "python", "binding"]
1314
license = "BSD-2-Clause"
1415

1516
[dependencies]
16-
cfg-if = "0.1"
17+
cfg-if = "1.0"
1718
libc = "0.2"
1819
num-complex = ">= 0.2, <= 0.4"
1920
num-traits = "0.2"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ rust-numpy
22
===========
33
[![Actions Status](https://github.com/PyO3/rust-numpy/workflows/CI/badge.svg)](https://github.com/PyO3/rust-numpy/actions)
44
[![Crate](https://img.shields.io/crates/v/numpy.svg)](https://crates.io/crates/numpy)
5-
[![Minimum rustc 1.41](https://img.shields.io/badge/rustc-1.41+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
5+
[![Minimum rustc 1.48](https://img.shields.io/badge/rustc-1.48+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
66

77
Rust bindings for the NumPy C-API.
88

@@ -11,7 +11,7 @@ Rust bindings for the NumPy C-API.
1111
- [Current main](https://pyo3.github.io/rust-numpy)
1212

1313
## Requirements
14-
- Rust >= 1.41.1
14+
- Rust >= 1.48.0
1515
- Basically, our MSRV follows the one of [PyO3](https://github.com/PyO3/pyo3)
1616
- Python >= 3.6
1717
- Python 3.5 support is dropped from 0.13

src/array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use crate::npyffi::{self, npy_intp, NPY_ORDER, PY_ARRAY_API};
33
use ndarray::*;
44
use num_traits::AsPrimitive;
55
use pyo3::{
6-
ffi, prelude::*, type_object, types::PyAny, AsPyPointer, PyDowncastError, PyNativeType,
7-
PyResult,
6+
ffi, prelude::*, pyobject_native_type_info, pyobject_native_type_named, type_object,
7+
types::PyAny, AsPyPointer, PyDowncastError, PyNativeType, PyResult,
88
};
99
use std::{
1010
cell::Cell,

src/dtype.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
use crate::npyffi::{NpyTypes, PyArray_Descr, NPY_TYPES, PY_ARRAY_API};
2+
use cfg_if::cfg_if;
3+
use pyo3::{ffi, prelude::*, pyobject_native_type_core, types::PyType, AsPyPointer, PyNativeType};
4+
use std::os::raw::c_int;
5+
26
pub use num_complex::Complex32 as c32;
37
pub use num_complex::Complex64 as c64;
4-
use pyo3::ffi;
5-
use pyo3::prelude::*;
6-
use pyo3::types::PyType;
7-
use pyo3::{AsPyPointer, PyNativeType};
8-
use std::os::raw::c_int;
98

109
/// Binding of [`numpy.dtype`](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html).
1110
///

src/lib.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
//! })
3030
//! }
3131
//! ```
32-
33-
#[macro_use]
34-
extern crate cfg_if;
35-
#[macro_use]
36-
extern crate pyo3;
37-
3832
pub mod array;
3933
pub mod convert;
4034
mod dtype;
@@ -65,9 +59,8 @@ pub use crate::readonly::{
6559
pub use crate::sum_products::{dot, einsum_impl, inner};
6660
pub use ndarray::{array, Ix1, Ix2, Ix3, Ix4, Ix5, Ix6, IxDyn};
6761

68-
/// Test readme
69-
#[doc(hidden)]
70-
pub mod doc_test {
62+
#[cfg(doctest)]
63+
mod doctest {
7164
macro_rules! doc_comment {
7265
($x: expr, $modname: ident) => {
7366
#[doc = $x]

0 commit comments

Comments
 (0)