Use a glob import in protobuf.rs

This removes the need to duplicate individual imports
from shared.rs and possibly forget something.

PiperOrigin-RevId: 558128872
pull/13562/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent 54805808a8
commit 33f239d355
  1. 4
      rust/protobuf.rs
  2. 14
      rust/shared.rs

@ -41,6 +41,4 @@ use protobuf_cpp as kernel;
#[cfg(upb_kernel)]
use protobuf_upb as kernel;
pub use kernel::{
BytesMut, Mut, MutProxy, ParseError, Proxied, ProxiedWithPresence, View, ViewProxy,
};
pub use kernel::__public::*;

@ -36,9 +36,17 @@
use std::fmt;
pub use optional::{AbsentField, FieldEntry, Optional, PresentField};
pub use proxied::{Mut, MutProxy, Proxied, ProxiedWithPresence, SettableValue, View, ViewProxy};
pub use string::{BytesMut, ProtoStr};
/// Everything in `__public` is re-exported in `protobuf.rs`.
/// These are the items protobuf users can access directly.
#[doc(hidden)]
pub mod __public {
pub use crate::optional::{AbsentField, FieldEntry, Optional, PresentField};
pub use crate::proxied::{
Mut, MutProxy, Proxied, ProxiedWithPresence, SettableValue, View, ViewProxy,
};
pub use crate::string::{BytesMut, ProtoStr};
}
pub use __public::*;
/// Everything in `__internal` is allowed to change without it being considered
/// a breaking change for the protobuf library. Nothing in here should be

Loading…
Cancel
Save