Skip to content

Commit f9902d9

Browse files
committed
chore:clippy
1 parent b565ccf commit f9902d9

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

python/src/thread_pool.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ static DEFAULT_POOL: GILOnceCell<Arc<ThreadPool>> = GILOnceCell::new();
1111
pub fn get_default_pool(py: Python<'_>) -> PyResult<Arc<ThreadPool>> {
1212
let runtime = DEFAULT_POOL.get_or_try_init(py, || {
1313
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}"))
1515
})?;
1616
Ok::<_, PyErr>(Arc::new(pool))
1717
})?;
@@ -29,7 +29,7 @@ impl PyThreadPool {
2929
.num_threads(num_threads)
3030
.build()
3131
.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}"))
3333
})?;
3434
Ok(Self(Arc::new(pool)))
3535
}

python/src/tiff.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl PyTIFF {
6565
.ifds()
6666
.as_ref()
6767
.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}")))?
6969
// TODO: avoid this clone; add Arc to underlying rust code?
7070
.clone();
7171
future_into_py(py, async move {
@@ -91,7 +91,7 @@ impl PyTIFF {
9191
.ifds()
9292
.as_ref()
9393
.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}")))?
9595
// TODO: avoid this clone; add Arc to underlying rust code?
9696
.clone();
9797
future_into_py(py, async move {

python/src/value.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ impl<'py> IntoPyObject<'py> for PyValue {
3535
Value::Ifd(_val) => Err(PyRuntimeError::new_err("Unsupported value type 'Ifd'")),
3636
Value::IfdBig(_val) => Err(PyRuntimeError::new_err("Unsupported value type 'IfdBig'")),
3737
v => Err(PyRuntimeError::new_err(format!(
38-
"Unknown value type: {:?}",
39-
v
38+
"Unknown value type: {v:?}"
4039
))),
4140
}
4241
}

0 commit comments

Comments
 (0)