Skip to content

Commit

Permalink
harfbuzz: Fix legacy_numeric_constants lints.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
waywardmonkeys committed May 2, 2024
1 parent 1fe061e commit f0742aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions harfbuzz/src/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -70,7 +70,7 @@ impl<'a> Blob<'a> {
#[cfg(feature = "std")]
pub fn new_from_arc_vec(data: Arc<Vec<u8>>) -> 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);
Expand Down

0 comments on commit f0742aa

Please sign in to comment.