From f0742aaef1ebb03fa2476b9f98c184d395092bc1 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Thu, 2 May 2024 23:16:22 +0700 Subject: [PATCH] harfbuzz: Fix `legacy_numeric_constants` lints. These are from nightly clippy. Prefer using associated constants rather than some of the older functions and constants as they are likely to be deprecated in the future. --- harfbuzz/src/blob.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/harfbuzz/src/blob.rs b/harfbuzz/src/blob.rs index b5eac3fb..ab0867c1 100644 --- a/harfbuzz/src/blob.rs +++ b/harfbuzz/src/blob.rs @@ -39,7 +39,7 @@ impl<'a> Blob<'a> { /// assert!(!blob.is_empty()); /// ``` pub fn new_read_only(data: &'a [u8]) -> Blob<'a> { - assert!(data.len() <= c_uint::max_value() as usize); + assert!(data.len() <= c_uint::MAX as usize); unsafe { Blob::from_raw(sys::hb_blob_create( data.as_ptr() as *const c_char, @@ -70,7 +70,7 @@ impl<'a> Blob<'a> { #[cfg(feature = "std")] pub fn new_from_arc_vec(data: Arc>) -> Blob<'static> { let len = data.len(); - assert!(len <= c_uint::max_value() as usize); + assert!(len <= c_uint::MAX as usize); unsafe { let data_ptr = data.as_ptr(); let ptr = Arc::into_raw(data);