From b23a488e5a968dcc58d911050b1d6d7f9f28ff66 Mon Sep 17 00:00:00 2001 From: Mossa Date: Sat, 16 Mar 2024 13:31:14 +0100 Subject: [PATCH] `cargo clippy` --- extendr-api/src/graphics/device_driver.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extendr-api/src/graphics/device_driver.rs b/extendr-api/src/graphics/device_driver.rs index 55707151c7..b253cebd4c 100644 --- a/extendr-api/src/graphics/device_driver.rs +++ b/extendr-api/src/graphics/device_driver.rs @@ -396,7 +396,7 @@ pub trait DeviceDriver: std::marker::Sized { // we just use `c.abs()`. // // [^1]: https://github.com/wch/r-source/blob/9bb47ca929c41a133786fa8fff7c70162bb75e50/src/include/R_ext/GraphicsDevice.h#L615-L617 - if let Some(c) = std::char::from_u32(c.abs() as _) { + if let Some(c) = std::char::from_u32(c.unsigned_abs()) { let data = ((*dd).deviceSpecific as *mut T).as_mut().unwrap(); let metric_info = data.char_metric(c, *gc, *dd); *ascent = metric_info.ascent;