diff --git a/CHANGELOG.md b/CHANGELOG.md index c32f275..c97f1a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,11 @@ - Add `WebTransport` instance for `Multiaddr`. See [PR 70]. - Disable all features of `multihash`. See [PR 77]. +- Mark `Protocol` as `#[non_exhaustive]`. See [PR 82]. [PR 70]: https://github.com/multiformats/rust-multiaddr/pull/70 [PR 77]: https://github.com/multiformats/rust-multiaddr/pull/77 +[PR 82]: https://github.com/multiformats/rust-multiaddr/pull/82 # 0.17.0 diff --git a/src/protocol.rs b/src/protocol.rs index a70a40d..2fc22c7 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -79,6 +79,7 @@ const PATH_SEGMENT_ENCODE_SET: &percent_encoding::AsciiSet = &percent_encoding:: /// platform-specific. This means that the actual validation of paths needs to /// happen separately. #[derive(PartialEq, Eq, Clone, Debug)] +#[non_exhaustive] pub enum Protocol<'a> { Dccp(u16), Dns(Cow<'a, str>),