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"
1010license = " MIT"
1111keywords = [" plot" , " graph" , " curve" , " surface" ]
1212categories = [" science" , " visualization" , " mathematics" , " graphics" ]
13+ rust-version = " 1.80"
1314
1415[dependencies ]
1516numpy = " 0.23.0"
1617ndarray = " 0.16.1"
1718curve-sampling = { version = " 0.5" , optional = true , git = " https://github.com/Chris00/rust-curve-sampling.git" }
18- lazy_static = " 1.4.0"
1919
2020[dependencies .pyo3 ]
2121version = " 0.23.3"
Original file line number Diff line number Diff line change 1010//! [Matplotlib]: https://matplotlib.org/
1111
1212use std:: {
13+ borrow:: Cow ,
1314 fmt:: { Display , Formatter } ,
1415 marker:: PhantomData ,
15- path:: Path , borrow:: Cow ,
16+ path:: Path ,
17+ sync:: LazyLock ,
1618} ;
17- use lazy_static:: lazy_static;
1819use pyo3:: {
1920 prelude:: * ,
2021 intern,
@@ -122,16 +123,16 @@ macro_rules! pyimport { ($name: path, $m: literal) => {
122123 } )
123124} }
124125
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 ( || {
129130 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 ( || {
132134 pyimport ! ( matplotlib:: PYPLOT , "matplotlib.pyplot" )
133- } ;
134- }
135+ } ) ;
135136
136137// RuntimeWarning: More than 20 figures have been opened. Figures
137138// created through the pyplot interface (`matplotlib.pyplot.figure`)
You can’t perform that action at this time.
0 commit comments