Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alecmocatta committed Jul 15, 2020
1 parent 0e73efe commit f2df2f0
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
10 changes: 5 additions & 5 deletions amadeus-aws/src/cloudfront.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ impl Cloudfront {
}
}

#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
type Output = std::pin::Pin<Box<dyn Stream<Item = Result<CloudfrontRow, AwsError>> + Send>>;
#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
type Output = impl Stream<Item = Result<CloudfrontRow, AwsError>> + Send;

FnMutNamed! {
Expand Down Expand Up @@ -103,7 +103,7 @@ FnMutNamed! {
}
.flatten_stream()
.map(|x: Result<Result<CloudfrontRow, _>, _>| x.and_then(identity));
#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
let ret = ret.boxed();
ret
}
Expand All @@ -114,13 +114,13 @@ impl Source for Cloudfront {
type Error = AwsError;

type ParStream = DistParStream<Self::DistStream>;
#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
#[allow(clippy::type_complexity)]
type DistStream = amadeus_core::par_stream::FlatMap<
amadeus_core::into_par_stream::IterDistStream<std::vec::IntoIter<String>>,
Closure,
>;
#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
type DistStream = impl DistributedStream<Item = Result<Self::Item, Self::Error>>;

fn par_stream(self) -> Self::ParStream {
Expand Down
10 changes: 5 additions & 5 deletions amadeus-commoncrawl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ impl CommonCrawl {
}
}

#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
type Output = std::pin::Pin<Box<dyn Stream<Item = Result<Webpage<'static>, io::Error>> + Send>>;
#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
type Output = impl Stream<Item = Result<Webpage<'static>, io::Error>> + Send;

FnMutNamed! {
Expand All @@ -99,7 +99,7 @@ FnMutNamed! {
WarcParser::new(body)
}
.flatten_stream();
#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
let ret = ret.boxed();
ret
}
Expand All @@ -110,13 +110,13 @@ impl Source for CommonCrawl {
type Error = io::Error;

type ParStream = DistParStream<Self::DistStream>;
#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
#[allow(clippy::type_complexity)]
type DistStream = amadeus_core::par_stream::FlatMap<
amadeus_core::into_par_stream::IterDistStream<std::vec::IntoIter<String>>,
Closure,
>;
#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
type DistStream = impl DistributedStream<Item = Result<Self::Item, Self::Error>>;

fn par_stream(self) -> Self::ParStream {
Expand Down
6 changes: 3 additions & 3 deletions amadeus-parquet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
#[cfg(nightly)]
extern crate test;

#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
mod internal;

#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
mod wrap {
use super::internal;
use async_trait::async_trait;
Expand Down Expand Up @@ -371,5 +371,5 @@ mod wrap {
}
}
}
#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
pub use wrap::*;
10 changes: 5 additions & 5 deletions amadeus-postgres/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ where
}
}

#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
type Output<Row> = Pin<Box<dyn Stream<Item = Result<Row, PostgresError>> + Send>>;
#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
type Output<Row> = impl Stream<Item = Result<Row, PostgresError>> + Send;

FnMutNamed! {
Expand Down Expand Up @@ -261,7 +261,7 @@ FnMutNamed! {
})
}
.flatten_stream();
#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
let ret = ret.boxed();
ret
}
Expand All @@ -275,15 +275,15 @@ where
type Error = PostgresError;

type ParStream = DistParStream<Self::DistStream>;
#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
#[allow(clippy::type_complexity)]
type DistStream = amadeus_core::par_stream::FlatMap<
amadeus_core::into_par_stream::IterDistStream<
std::vec::IntoIter<(ConnectParams, Vec<PostgresSelect>)>,
>,
Closure<Row>,
>;
#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
type DistStream = impl DistributedStream<Item = Result<Self::Item, Self::Error>>;

fn par_stream(self) -> Self::ParStream {
Expand Down
10 changes: 5 additions & 5 deletions amadeus-serde/src/csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ where
}

type Error<P, E> = CsvError<E, <P as Partition>::Error, <<P as Partition>::Page as Page>::Error>;
#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
type Output<P, Row, E> = std::pin::Pin<Box<dyn Stream<Item = Result<Row, Error<P, E>>>>>;
#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
type Output<P: Partition, Row, E> = impl Stream<Item = Result<Row, Error<P, E>>>;

FnMutNamed! {
Expand Down Expand Up @@ -128,7 +128,7 @@ FnMutNamed! {
.map(ResultExpandIter::new)
.flatten_stream()
.map(|row: Result<Result<Row, Error<P, E>>, Error<P, E>>| Ok(row??));
#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
let ret = ret.boxed_local();
ret
}
Expand All @@ -148,13 +148,13 @@ where
>;

type ParStream = DistParStream<Self::DistStream>;
#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
#[allow(clippy::type_complexity)]
type DistStream = amadeus_core::par_stream::FlatMap<
amadeus_core::into_par_stream::IterDistStream<std::vec::IntoIter<F::Partition>>,
Closure<F::Partition, Row, F::Error>,
>;
#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
type DistStream = impl DistributedStream<Item = Result<Self::Item, Self::Error>>;

fn par_stream(self) -> Self::ParStream {
Expand Down
10 changes: 5 additions & 5 deletions amadeus-serde/src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ where
}

type Error<P, E> = JsonError<E, <P as Partition>::Error, <<P as Partition>::Page as Page>::Error>;
#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
type Output<P, Row, E> = std::pin::Pin<Box<dyn Stream<Item = Result<Row, Error<P, E>>>>>;
#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
type Output<P: Partition, Row, E> = impl Stream<Item = Result<Row, Error<P, E>>>;

FnMutNamed! {
Expand Down Expand Up @@ -82,7 +82,7 @@ FnMutNamed! {
.map(ResultExpandIter::new)
.flatten_stream()
.map(|row: Result<Result<Row, Error<P, E>>, Error<P, E>>| Ok(row??));
#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
let ret = ret.boxed_local();
ret
}
Expand All @@ -102,13 +102,13 @@ where
>;

type ParStream = DistParStream<Self::DistStream>;
#[cfg(not(nightly))]
#[cfg(not(all(nightly, not(doc))))]
#[allow(clippy::type_complexity)]
type DistStream = amadeus_core::par_stream::FlatMap<
amadeus_core::into_par_stream::IterDistStream<std::vec::IntoIter<F::Partition>>,
Closure<F::Partition, Row, F::Error>,
>;
#[cfg(nightly)]
#[cfg(all(nightly, not(doc)))]
type DistStream = impl DistributedStream<Item = Result<Self::Item, Self::Error>>;

fn par_stream(self) -> Self::ParStream {
Expand Down

0 comments on commit f2df2f0

Please sign in to comment.