File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ static DEFAULT_POOL: GILOnceCell<Arc<ThreadPool>> = GILOnceCell::new();
11
11
pub fn get_default_pool ( py : Python < ' _ > ) -> PyResult < Arc < ThreadPool > > {
12
12
let runtime = DEFAULT_POOL . get_or_try_init ( py, || {
13
13
let pool = ThreadPoolBuilder :: new ( ) . build ( ) . map_err ( |err| {
14
- PyValueError :: new_err ( format ! ( "Could not create rayon threadpool. {}" , err ) )
14
+ PyValueError :: new_err ( format ! ( "Could not create rayon threadpool. {err}" ) )
15
15
} ) ?;
16
16
Ok :: < _ , PyErr > ( Arc :: new ( pool) )
17
17
} ) ?;
@@ -29,7 +29,7 @@ impl PyThreadPool {
29
29
. num_threads ( num_threads)
30
30
. build ( )
31
31
. map_err ( |err| {
32
- PyValueError :: new_err ( format ! ( "Could not create rayon threadpool. {}" , err ) )
32
+ PyValueError :: new_err ( format ! ( "Could not create rayon threadpool. {err}" ) )
33
33
} ) ?;
34
34
Ok ( Self ( Arc :: new ( pool) ) )
35
35
}
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ impl PyTIFF {
65
65
. ifds ( )
66
66
. as_ref ( )
67
67
. get ( z)
68
- . ok_or_else ( || PyIndexError :: new_err ( format ! ( "No IFD found for z={}" , z ) ) ) ?
68
+ . ok_or_else ( || PyIndexError :: new_err ( format ! ( "No IFD found for z={z}" ) ) ) ?
69
69
// TODO: avoid this clone; add Arc to underlying rust code?
70
70
. clone ( ) ;
71
71
future_into_py ( py, async move {
@@ -91,7 +91,7 @@ impl PyTIFF {
91
91
. ifds ( )
92
92
. as_ref ( )
93
93
. get ( z)
94
- . ok_or_else ( || PyIndexError :: new_err ( format ! ( "No IFD found for z={}" , z ) ) ) ?
94
+ . ok_or_else ( || PyIndexError :: new_err ( format ! ( "No IFD found for z={z}" ) ) ) ?
95
95
// TODO: avoid this clone; add Arc to underlying rust code?
96
96
. clone ( ) ;
97
97
future_into_py ( py, async move {
Original file line number Diff line number Diff line change @@ -35,8 +35,7 @@ impl<'py> IntoPyObject<'py> for PyValue {
35
35
Value :: Ifd ( _val) => Err ( PyRuntimeError :: new_err ( "Unsupported value type 'Ifd'" ) ) ,
36
36
Value :: IfdBig ( _val) => Err ( PyRuntimeError :: new_err ( "Unsupported value type 'IfdBig'" ) ) ,
37
37
v => Err ( PyRuntimeError :: new_err ( format ! (
38
- "Unknown value type: {:?}" ,
39
- v
38
+ "Unknown value type: {v:?}"
40
39
) ) ) ,
41
40
}
42
41
}
You can’t perform that action at this time.
0 commit comments