mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-10-02 07:20:35 +00:00
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:
parent
fd12ae14b4
commit
94ca5e7668
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user