From 120e1a56203b4617c88e6c4408ce82afc09307ab Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Thu, 31 Aug 2023 20:25:12 -0700 Subject: [PATCH] custom: rename __getrandom_internal to follow Rust conventions This symbol isn't actually used anywhere, so it's fine to be renamed. Once we are at MSRV 1.37, we can change the code to use an [unnamed `const`](https://blog.rust-lang.org/2019/08/15/Rust-1.37.0.html#using-unnamed-const-items-for-macros), for example: ```rust const _: () = { // We use Rust ABI to be safe against potential panics in the passed function. #[no_mangle] unsafe fn __getrandom_custom(dest: *mut u8, len: usize) -> u32 { ``` --- src/custom.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/custom.rs b/src/custom.rs index c9207d061..66e4256fa 100644 --- a/src/custom.rs +++ b/src/custom.rs @@ -77,7 +77,7 @@ use core::{mem::MaybeUninit, num::NonZeroU32}; macro_rules! register_custom_getrandom { ($path:path) => { // TODO(MSRV 1.37): change to unnamed block - const __getrandom_internal: () = { + const __GETRANDOM_INTERNAL: () = { // We use Rust ABI to be safe against potential panics in the passed function. #[no_mangle] unsafe fn __getrandom_custom(dest: *mut u8, len: usize) -> u32 {