Edit comment in empty_repeated suggesting it's a thread-local value

PiperOrigin-RevId: 597610971
pull/15390/head
Alyssa Haroldsen 11 months ago committed by Copybara-Service
parent f98af99bad
commit 406fa60c9e
  1. 2
      rust/upb.rs

@ -519,7 +519,7 @@ pub fn cast_enum_repeated_mut<E: Enum + ProxiedInRepeated>(
pub fn empty_array<T: ?Sized + ProxiedInRepeated>() -> RepeatedView<'static, T> { pub fn empty_array<T: ?Sized + ProxiedInRepeated>() -> RepeatedView<'static, T> {
// TODO: Consider creating a static empty array in C. // TODO: Consider creating a static empty array in C.
// Use `i32` for a shared empty repeated for all repeated types on a thread. // Use `i32` for a shared empty repeated for all repeated types in the program.
static EMPTY_REPEATED_VIEW: OnceLock<RepeatedView<'static, i32>> = OnceLock::new(); static EMPTY_REPEATED_VIEW: OnceLock<RepeatedView<'static, i32>> = OnceLock::new();
// SAFETY: // SAFETY:

Loading…
Cancel
Save