Skip to content

Commit f70c955

Browse files
Fix doc badges for gated features
1 parent 6bb1fe7 commit f70c955

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
members = ["src/di", "src/di-*", "test/di"]
33

44
[workspace.package]
5-
version = "3.2.0"
5+
version = "3.2.1"
66
authors = ["Chris Martinez <chris.s.martinez@outlook.com>"]
77
license = "MIT"
88
homepage = "https://commonsensesoftware.github.io/more-rs-di/"

src/di-macros/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[package]
22
name = "more-di-macros"
3-
description = "Macro implementation of #[injectable(Trait)]"
4-
include = ["*.rs"]
3+
description = "Macro implementation of #[injectable]"
54
version.workspace = true
65
edition.workspace = true
76
authors.workspace = true

src/di/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "more-di"
33
description = "Provides support for dependency injection (DI)"
44
keywords = ["more", "di", "dependency", "injection", "ioc"]
55
readme = "README.md"
6-
include = ["*.rs", "!build.rs", "README.md"]
6+
exclude = ["build.rs"]
77
version.workspace = true
88
edition.workspace = true
99
authors.workspace = true

src/di/lib.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,16 @@ cfg_if! {
5858
if #[cfg(feature = "builder")] {
5959
mod builder;
6060

61+
#[cfg_attr(docsrs, doc(cfg(feature = "builder")))]
6162
pub use builder::{
6263
exactly_one, exactly_one_with_key, existing, existing_as_self, existing_with_key, existing_with_key_as_self,
6364
scoped, scoped_factory, scoped_with_key, scoped_with_key_factory, singleton, singleton_as_self,
6465
singleton_factory, singleton_with_key, singleton_with_key_factory, transient, transient_as_self,
6566
transient_factory, transient_with_key, transient_with_key_as_self, transient_with_key_factory, zero_or_more,
6667
zero_or_more_with_key, zero_or_one, zero_or_one_with_key,
6768
};
69+
70+
#[cfg_attr(docsrs, doc(cfg(feature = "builder")))]
6871
pub use description::ServiceDescriptorBuilder;
6972
}
7073
}
@@ -74,17 +77,17 @@ cfg_if! {
7477
mod activator;
7578
mod inject;
7679

80+
#[cfg_attr(docsrs, doc(cfg(feature = "inject")))]
7781
pub use activator::Activator;
82+
83+
#[cfg_attr(docsrs, doc(cfg(feature = "inject")))]
7884
pub use inject::{InjectBuilder, Injectable, inject, injectable};
7985
}
8086
}
8187

82-
cfg_if! {
83-
if #[cfg(feature = "lazy")] {
84-
/// Contains support for lazy service resolution.
85-
pub mod lazy;
86-
}
87-
}
88+
/// Contains support for lazy service resolution.
89+
#[cfg(feature = "lazy")]
90+
pub mod lazy;
8891

8992
#[cfg(test)]
9093
mod test;

0 commit comments

Comments
 (0)