Export string::Utf8Error

`ProtoStr` is a public type and it has a public
method `to_str`, however `to_str` returns a private
type `Utf8Error`, which triggers `private-interfaces` [1].

Exporting string::Utf8Error makes it possible for other
crates to wrap it in another error type and propagate
it with "?".

[1] https://doc.rust-lang.org/beta/rustc/lints/listing/warn-by-default.html#private-interfaces

PiperOrigin-RevId: 684477510
pull/18739/head
Protobuf Team Bot 6 months ago committed by Copybara-Service
parent cffa590260
commit 29c232a6b4
  1. 2
      rust/shared.rs

@ -41,7 +41,7 @@ pub mod __public {
pub use crate::repeated::{
ProxiedInRepeated, Repeated, RepeatedIter, RepeatedMut, RepeatedView,
};
pub use crate::string::{ProtoBytes, ProtoStr, ProtoString};
pub use crate::string::{ProtoBytes, ProtoStr, ProtoString, Utf8Error};
pub use crate::{ParseError, SerializeError};
}
pub use __public::*;

Loading…
Cancel
Save