subscriber: fix unused method warnings for Extensions (#1686)

## Motivation

Currently, there are some `pub(crate)` methods on the `Extensions`,
`ExtensionsMut`, and `ExtensionsInner` types that are only used when the
"registry" feature is enabled. However, the _types_ exist when the "std"
feature flag is enabled, so those methods produce unused method
warnings.

## Solution

This commit adds `#[cfg(feature = "registry")]` to those methods, fixing
the warning.
This commit is contained in:
Eliza Weisman 2021-10-25 09:36:27 -07:00
parent fd12ae14b4
commit 94ca5e7668
No known key found for this signature in database
GPG Key ID: F9C1A595C3814436

View File

@ -120,6 +120,7 @@ pub(crate) struct ExtensionsInner {
impl ExtensionsInner {
/// Create an empty `Extensions`.
#[cfg(any(test, feature = "registry"))]
#[inline]
#[cfg(any(test, feature = "registry"))]
pub(crate) fn new() -> ExtensionsInner {