Skip to content

Commit b4c3fa2

Browse files
committedJan 11, 2019
Initial mitigations for rust-lang/rust#53546
Sadly the bug also manifests itself in netsoup, which is really hard to work around, so we're kind of stuck here for now... Unless we Box everything.
1 parent bcfb774 commit b4c3fa2

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed
 

Diff for: ‎noria/src/table.rs

+22-2
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,26 @@ pub struct Table {
213213
shard_addrs: Vec<SocketAddr>,
214214
}
215215

216+
// b/c of https://github.com/rust-lang/rust/issues/53546
217+
pub fn map1(
218+
_: (),
219+
_: Tagged<()>,
220+
) -> Result<
221+
(),
222+
tower_buffer::Error<
223+
tower_balance::Error<
224+
tower_buffer::Error<
225+
tokio_tower::multiplex::client::Error<
226+
tokio_tower::multiplex::MultiplexTransport<Transport, Tagger>,
227+
>,
228+
>,
229+
tokio_tower::multiplex::client::SpawnError<std::io::Error>,
230+
>,
231+
>,
232+
> {
233+
Ok(())
234+
}
235+
216236
impl Service<Input> for Table {
217237
type Error = TableError;
218238
type Response = <TableRpc as Service<Tagged<LocalOrNot<Input>>>>::Response;
@@ -292,9 +312,9 @@ impl Service<Input> for Table {
292312

293313
future::Either::B(
294314
wait_for
295-
.fold((), |_, _| Ok(()))
315+
.fold((), map1)
296316
.map_err(TableError::from)
297-
.map(|_| Tagged::from(())),
317+
.map(Tagged::from),
298318
)
299319
}
300320
}

0 commit comments

Comments
 (0)
Please sign in to comment.