Skip to content

Commit d9cc936

Browse files
Update doc
1 parent cfbc501 commit d9cc936

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/di/collection.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ macro_rules! decorate {
1818
/// # Remarks
1919
///
2020
/// This function will only decorate the last registered [ServiceDescriptor] for the specified service type. If
21-
/// there are multiple, the others are ignored. If you need decorate all services of a particular service type,
22-
/// consider using [Self::decorate_all] instead. If the service to be decorated is not registered, this function
23-
/// does nothing. The decorator [ServiceDescriptor] is created with the same lifetime as the original. The
24-
/// implementation type of the decorator is determined by the generic parameter `TImpl`. If the original and
25-
/// decorator implementation types are the same, the original, decorated [ServiceDescriptor] is not replaced to
26-
/// prevent infinite recursion.
21+
/// there are multiple, the others are ignored. If you need to decorate all services of a particular service
22+
/// type, consider using [decorate_all](Self::decorate_all) instead. If the service to be decorated is not
23+
/// registered, this function does nothing. The decorator [ServiceDescriptor] is created with the same
24+
/// [lifetime](crate::ServiceLifetime) as the original service registration. The implementation type of the
25+
/// decorator is determined by the generic parameter `TImpl`. If the original and decorator implementation types
26+
/// are the same, the original, decorated [ServiceDescriptor] is not replaced to prevent infinite recursion.
2727
///
2828
/// # Example
2929
///
@@ -99,9 +99,10 @@ macro_rules! decorate {
9999
///
100100
/// # Remarks
101101
///
102-
/// This function decorates all registered [ServiceDescriptor] for the specified service type. If there are none,
103-
/// this function does nothing. The decorator [ServiceDescriptor] is created with the same lifetime as the original.
104-
/// If the original, decorated [ServiceDescriptor] is the same the decorator type, it is ignored.
102+
/// This function decorates all registered [ServiceDescriptor] instances for the specified service type. If
103+
/// there are none, this function does nothing. The decorator [ServiceDescriptor] is created with the same
104+
/// [lifetime](crate::ServiceLifetime) as the original. If the original, decorated [ServiceDescriptor] is the
105+
/// same the decorator type, it is ignored.
105106
///
106107
/// # Example
107108
///

0 commit comments

Comments
 (0)