Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack: Fix NewSpawnWatch::layer type signature #2134

Merged
merged 1 commit into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion linkerd/stack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ linkerd-error = { path = "../error" }
parking_lot = "0.12"
pin-project = "1"
thiserror = "1"
tokio = { version = "1", features = ["time", "sync"] }
tokio = { version = "1", features = ["macros", "rt", "sync", "time"] }
tokio-util = { version = "0.7" }
tower = { version = "0.4", features = ["filter", "spawn-ready", "util"] }
tracing = "0.1"
Expand Down
9 changes: 4 additions & 5 deletions linkerd/stack/src/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub struct NewFromTuple<T, P, N> {
_marker: PhantomData<fn() -> P>,
}

type SpawnFromTuple<P, T, N> = NewSpawnWatch<P, NewWatchedFromTuple<T, N>>;
type SpawnFromTuple<T, P, N> = NewSpawnWatch<P, NewWatchedFromTuple<T, N>>;

// === impl NewSpawnWatch ===

Expand Down Expand Up @@ -167,13 +167,12 @@ impl<T, N> NewWatchedFromTuple<T, N> {
}
}

impl<T, P, N, M> NewService<T> for NewWatchedFromTuple<P, N>
impl<T, P, N> NewService<T> for NewWatchedFromTuple<P, N>
where
T: Clone,
N: NewService<T, Service = M>,
M: NewService<P> + Send + 'static,
N: NewService<T>,
{
type Service = NewFromTuple<T, P, M>;
type Service = NewFromTuple<T, P, N::Service>;

fn new_service(&self, target: T) -> Self::Service {
// Create a `NewService` that is used to process updates to the watched
Expand Down