Skip to content

Commit 3dcf0ea

Browse files
committed
Remove workaround
For rust-lang/rust#65863.
1 parent 6ce46c5 commit 3dcf0ea

File tree

5 files changed

+0
-76
lines changed

5 files changed

+0
-76
lines changed

noria/src/controller.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ where
5858
type Response = hyper::body::Bytes;
5959
type Error = failure::Error;
6060

61-
#[cfg(not(doc))]
6261
type Future = impl Future<Output = Result<Self::Response, Self::Error>> + Send;
63-
#[cfg(doc)]
64-
type Future = crate::doc_mock::Future<Result<Self::Response, Self::Error>>;
6562

6663
fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
6764
Poll::Ready(Ok(()))
@@ -175,10 +172,7 @@ impl ControllerHandle<consensus::ZookeeperAuthority> {
175172

176173
// this alias is needed to work around -> impl Trait capturing _all_ lifetimes by default
177174
// the A parameter is needed so it gets captured into the impl Trait
178-
#[cfg(not(doc))]
179175
type RpcFuture<A, R> = impl Future<Output = Result<R, failure::Error>>;
180-
#[cfg(doc)]
181-
type RpcFuture<A, R> = crate::doc_mock::FutureWithExtra<Result<R, failure::Error>, A>;
182176

183177
// Needed b/c of https://github.com/rust-lang/rust/issues/65442
184178
async fn finalize<R, E>(

noria/src/doc_mock.rs

Lines changed: 0 additions & 50 deletions
This file was deleted.

noria/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ pub mod channel;
215215
#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/57411
216216
pub mod consensus;
217217
#[doc(hidden)]
218-
pub mod doc_mock;
219-
#[doc(hidden)]
220218
#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/57411
221219
pub mod internal;
222220

noria/src/table.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,7 @@ impl Service<()> for Endpoint {
214214
type Response = InnerService;
215215
type Error = tokio::io::Error;
216216

217-
#[cfg(not(doc))]
218217
type Future = impl Future<Output = Result<Self::Response, Self::Error>>;
219-
#[cfg(doc)]
220-
type Future = crate::doc_mock::Future<Result<Self::Response, Self::Error>>;
221218

222219
fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
223220
Poll::Ready(Ok(()))
@@ -260,12 +257,9 @@ fn make_table_discover(addr: SocketAddr) -> Discover {
260257
}
261258

262259
// Unpin + Send bounds are needed due to https://github.com/rust-lang/rust/issues/55997
263-
#[cfg(not(doc))]
264260
type Discover = impl tower_discover::Discover<Key = usize, Service = InnerService, Error = tokio::io::Error>
265261
+ Unpin
266262
+ Send;
267-
#[cfg(doc)]
268-
type Discover = crate::doc_mock::Discover<InnerService>;
269263

270264
pub(crate) type TableRpc = Buffer<
271265
ConcurrencyLimit<Balance<Discover, Tagged<LocalOrNot<Input>>>>,
@@ -585,10 +579,7 @@ impl Service<Vec<TableOperation>> for Table {
585579
type Error = TableError;
586580
type Response = <TableRpc as Service<Tagged<LocalOrNot<Input>>>>::Response;
587581

588-
#[cfg(not(doc))]
589582
type Future = impl Future<Output = Result<Tagged<()>, TableError>> + Send;
590-
#[cfg(doc)]
591-
type Future = crate::doc_mock::Future<Result<Tagged<()>, TableError>>;
592583

593584
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
594585
for s in &mut self.shards {

noria/src/view.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ impl Service<()> for Endpoint {
4141
type Response = InnerService;
4242
type Error = tokio::io::Error;
4343

44-
#[cfg(not(doc))]
4544
type Future = impl Future<Output = Result<Self::Response, Self::Error>>;
46-
#[cfg(doc)]
47-
type Future = crate::doc_mock::Future<Result<Self::Response, Self::Error>>;
4845

4946
fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
5047
Poll::Ready(Ok(()))
@@ -85,12 +82,9 @@ fn make_views_discover(addr: SocketAddr) -> Discover {
8582
}
8683

8784
// Unpin + Send bounds are needed due to https://github.com/rust-lang/rust/issues/55997
88-
#[cfg(not(doc))]
8985
type Discover = impl tower_discover::Discover<Key = usize, Service = InnerService, Error = tokio::io::Error>
9086
+ Unpin
9187
+ Send;
92-
#[cfg(doc)]
93-
type Discover = crate::doc_mock::Discover<InnerService>;
9488

9589
pub(crate) type ViewRpc =
9690
Buffer<ConcurrencyLimit<Balance<Discover, Tagged<ReadQuery>>>, Tagged<ReadQuery>>;
@@ -241,10 +235,7 @@ impl Service<(Vec<Vec<DataType>>, bool)> for View {
241235
type Response = Vec<Results>;
242236
type Error = ViewError;
243237

244-
#[cfg(not(doc))]
245238
type Future = impl Future<Output = Result<Self::Response, Self::Error>> + Send;
246-
#[cfg(doc)]
247-
type Future = crate::doc_mock::Future<Result<Self::Response, Self::Error>>;
248239

249240
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
250241
for s in &mut self.shards {

0 commit comments

Comments
 (0)