Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subscriber: fix unused method warnings for Extensions #1686

Merged
merged 1 commit into from
Oct 25, 2021

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Oct 25, 2021

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.

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.

This commit adds `#[cfg(feature = "registry")]` to those methods, fixing
the warning.
@hawkw hawkw requested review from davidbarsky and a team as code owners October 25, 2021 16:26
@hawkw hawkw merged commit 3392be9 into master Oct 25, 2021
@hawkw hawkw deleted the eliza/fix-extensions-flags branch October 25, 2021 16:36
hawkw added a commit that referenced this pull request Oct 25, 2021
## 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.
hawkw added a commit that referenced this pull request Oct 25, 2021
# 0.3.1 (Oct 25, 2021)

This release fixes a few issues related to feature flagging.

### Fixed

- **time**: Compilation error when enabling the "time" feature flag
  without also enabling the "local-time" feature flag ([#1685])
- **registry**: Unused method warnings when the "std" feature is enabled
  but the "registry" feature is disabled ([#1686])

[#1685]: #1685
[#1686]: #1686
hawkw added a commit that referenced this pull request Oct 25, 2021
# 0.3.1 (Oct 25, 2021)

This release fixes a few issues related to feature flagging.

### Fixed

- **time**: Compilation error when enabling the "time" feature flag
  without also enabling the "local-time" feature flag ([#1685])
- **registry**: Unused method warnings when the "std" feature is enabled
  but the "registry" feature is disabled ([#1686])

[#1685]: #1685
[#1686]: #1686
kaffarell pushed a commit to kaffarell/tracing that referenced this pull request May 22, 2024
# 0.3.1 (Oct 25, 2021)

This release fixes a few issues related to feature flagging.

### Fixed

- **time**: Compilation error when enabling the "time" feature flag
  without also enabling the "local-time" feature flag ([tokio-rs#1685])
- **registry**: Unused method warnings when the "std" feature is enabled
  but the "registry" feature is disabled ([tokio-rs#1686])

[tokio-rs#1685]: tokio-rs#1685
[tokio-rs#1686]: tokio-rs#1686
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants