Skip to content

Commit d127592

Browse files
authored
feat(app/core): add Layers::into_inner() (#4192)
this commit introduces an `into_inner()` method to `Layers<L>`. like the equivalent method for `Stack<S>`, it provides a way to consume the stack or layer, returning the inner `L`-typed layers. Signed-off-by: katelyn martin <[email protected]>
1 parent 0106ae3 commit d127592

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

linkerd/app/core/src/svc.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ impl<L> Layers<L> {
112112
pub fn push_instrument<G: Clone>(self, get_span: G) -> Layers<Pair<L, NewInstrumentLayer<G>>> {
113113
self.push(NewInstrumentLayer::new(get_span))
114114
}
115+
116+
pub fn into_inner(self) -> L {
117+
self.0
118+
}
115119
}
116120

117121
impl<M, L: Layer<M>> Layer<M> for Layers<L> {

0 commit comments

Comments
 (0)