Skip to content

Commit 2924500

Browse files
Feature/174/implement clone for make allow all authenticator (#179)
* Implement `Clone` for `MakeAllowAllAuthenticator`. Signed-off-by: Azriel Hoh <azriel@healthpoint.co.nz> * Update `CHANGELOG.md`. Signed-off-by: Azriel Hoh <azriel@healthpoint.co.nz> --------- Signed-off-by: Azriel Hoh <azriel@healthpoint.co.nz>
1 parent 5b5671e commit 2924500

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88
### Changed
99

1010
### Added
11+
- Implement `Clone` on `MakeAllowAllAuthenticator`.
1112

1213
### Fixed
1314

src/auth.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,21 @@ where
9696
marker: PhantomData<RC>,
9797
}
9898

99+
impl<T, RC> Clone for MakeAllowAllAuthenticator<T, RC>
100+
where
101+
T: Clone,
102+
RC: RcBound,
103+
RC::Result: Send + 'static,
104+
{
105+
fn clone(&self) -> Self {
106+
Self {
107+
inner: self.inner.clone(),
108+
subject: self.subject.clone(),
109+
marker: PhantomData,
110+
}
111+
}
112+
}
113+
99114
impl<T, RC> MakeAllowAllAuthenticator<T, RC>
100115
where
101116
RC: RcBound,

0 commit comments

Comments
 (0)