Skip to content

Commit 25c79c3

Browse files
committed
Add must_use attributes
1 parent 6dcaeb4 commit 25c79c3

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/provide/owned.rs

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ pub trait Provide<T>: Sized {
103103
/// let (Wrapper(dependency), _): (Wrapper<_>, _) = provider.provide();
104104
/// assert_eq!(dependency, MyDependency { foo: 1, bar: 2.0 });
105105
/// ```
106+
#[must_use = "this call returns dependency and remaining part of the provider"]
106107
fn provide(self) -> (T, Self::Remainder);
107108
}
108109

src/with/provide/owned.rs

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub trait ProvideWith<T, C>: Sized {
2525
///
2626
/// todo!()
2727
/// ```
28+
#[must_use = "this call returns dependency and remaining part of the provider"]
2829
fn provide_with(self, context: C) -> (T, Self::Remainder);
2930
}
3031

src/with/with.rs

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub trait With<T>: Sized {
1919
///
2020
/// todo!()
2121
/// ```
22+
#[must_use]
2223
fn with(self, dependency: T) -> Self::Output;
2324
}
2425

0 commit comments

Comments
 (0)