diff options
author | Daniel Eades <danieleades@hotmail.com> | 2021-12-27 11:12:15 +0000 |
---|---|---|
committer | Daniel Eades <danieleades@hotmail.com> | 2021-12-29 12:12:06 +0000 |
commit | 41b3de8d4acbeedc1889b97771de329ae791f354 (patch) | |
tree | fbdf13434037c5ea107e0b370ac3f492d2918e6f /src | |
parent | f9bf236a4890e293f5c4f074022d671a6a02ae0f (diff) |
use 'Self' to refer to own type
Diffstat (limited to 'src')
-rw-r--r-- | src/builder.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/builder.rs b/src/builder.rs index f429ad4..4942b47 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -272,7 +272,7 @@ impl ConfigBuilder<AsyncState> { /// /// Calling this method does not invoke any I/O. [`Source`] is only saved in internal register for later use. #[must_use] - pub fn add_source<T>(mut self, source: T) -> ConfigBuilder<AsyncState> + pub fn add_source<T>(mut self, source: T) -> Self where T: Source + Send + Sync + 'static, { @@ -284,7 +284,7 @@ impl ConfigBuilder<AsyncState> { /// /// Calling this method does not invoke any I/O. [`AsyncSource`] is only saved in internal register for later use. #[must_use] - pub fn add_async_source<T>(mut self, source: T) -> ConfigBuilder<AsyncState> + pub fn add_async_source<T>(mut self, source: T) -> Self where T: AsyncSource + Send + Sync + 'static, { |