File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ documentation = "https://docs.rs/matplotlib"
10
10
license = " MIT"
11
11
keywords = [" plot" , " graph" , " curve" , " surface" ]
12
12
categories = [" science" , " visualization" , " mathematics" , " graphics" ]
13
+ rust-version = " 1.80"
13
14
14
15
[dependencies ]
15
16
numpy = " 0.23.0"
16
17
ndarray = " 0.16.1"
17
18
curve-sampling = { version = " 0.5" , optional = true , git = " https://github.com/Chris00/rust-curve-sampling.git" }
18
- lazy_static = " 1.4.0"
19
19
20
20
[dependencies .pyo3 ]
21
21
version = " 0.23.3"
Original file line number Diff line number Diff line change 10
10
//! [Matplotlib]: https://matplotlib.org/
11
11
12
12
use std:: {
13
+ borrow:: Cow ,
13
14
fmt:: { Display , Formatter } ,
14
15
marker:: PhantomData ,
15
- path:: Path , borrow:: Cow ,
16
+ path:: Path ,
17
+ sync:: LazyLock ,
16
18
} ;
17
- use lazy_static:: lazy_static;
18
19
use pyo3:: {
19
20
prelude:: * ,
20
21
intern,
@@ -122,16 +123,16 @@ macro_rules! pyimport { ($name: path, $m: literal) => {
122
123
} )
123
124
} }
124
125
125
- lazy_static ! {
126
- /// ⚠ Accessing these may try to lock Python's GIL. Make sure it is
127
- /// executed outside a call to `Python::with_gil`.
128
- static ref FIGURE : Result < Py < PyModule > , ImportError > = {
126
+ /// ⚠ Accessing these may try to lock Python's GIL. Make sure it is
127
+ /// executed outside a call to ` Python::with_gil`.
128
+ static FIGURE : LazyLock < Result < Py < PyModule > , ImportError > > =
129
+ LazyLock :: new ( || {
129
130
pyimport ! ( matplotlib:: FIGURE , "matplotlib.figure" )
130
- } ;
131
- static ref PYPLOT : Result <Py <PyModule >, ImportError > = {
131
+ } ) ;
132
+ static PYPLOT : LazyLock < Result < Py < PyModule > , ImportError > > =
133
+ LazyLock :: new ( || {
132
134
pyimport ! ( matplotlib:: PYPLOT , "matplotlib.pyplot" )
133
- } ;
134
- }
135
+ } ) ;
135
136
136
137
// RuntimeWarning: More than 20 figures have been opened. Figures
137
138
// created through the pyplot interface (`matplotlib.pyplot.figure`)
You can’t perform that action at this time.
0 commit comments