File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,7 @@ mod kdtree;
55mod rtree;
66pub ( crate ) mod util;
77
8- use pyo3:: exceptions:: PyRuntimeWarning ;
9- use pyo3:: intern;
108use pyo3:: prelude:: * ;
11- use pyo3:: types:: PyTuple ;
129
1310const VERSION : & str = env ! ( "CARGO_PKG_VERSION" ) ;
1411
@@ -19,15 +16,19 @@ fn ___version() -> &'static str {
1916
2017/// Raise RuntimeWarning for debug builds
2118#[ pyfunction]
22- fn check_debug_build ( py : Python ) -> PyResult < ( ) > {
19+ fn check_debug_build ( _py : Python ) -> PyResult < ( ) > {
2320 #[ cfg( debug_assertions) ]
2421 {
25- let warnings_mod = py. import ( intern ! ( py, "warnings" ) ) ?;
22+ use pyo3:: exceptions:: PyRuntimeWarning ;
23+ use pyo3:: intern;
24+ use pyo3:: types:: PyTuple ;
25+
26+ let warnings_mod = _py. import ( intern ! ( _py, "warnings" ) ) ?;
2627 let warning = PyRuntimeWarning :: new_err (
2728 "geoindex-rs has not been compiled in release mode. Performance will be degraded." ,
2829 ) ;
29- let args = PyTuple :: new ( py , vec ! [ warning] ) ?;
30- warnings_mod. call_method1 ( intern ! ( py , "warn" ) , args) ?;
30+ let args = PyTuple :: new ( _py , vec ! [ warning] ) ?;
31+ warnings_mod. call_method1 ( intern ! ( _py , "warn" ) , args) ?;
3132 }
3233
3334 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments