Try fix compile failure after merge
use std::any::Any;
use std::fmt::Display;
+use std::future::Future;
use std::sync::Arc;
use common_datablocks::DataBlock;
@@ -177,7 +178,12 @@ impl GithubSource {
impl AsyncSource for GithubSource {
const NAME: &'static str = "GithubSource";
- async fn generate(&mut self) -> Result<Option<DataBlock>> {
+ type BlockFuture<'a>
+ where Self: 'a
+ = impl Future<Output = Result<Option<DataBlock>>>;
+
+ fn generate(&mut self) -> Self::BlockFuture<'_> {
+ async {
if self.finish {
return Ok(None);
}
@@ -187,3 +193,4 @@ impl AsyncSource for GithubSource {
Ok(Some(DataBlock::create(self.schema.clone(), arrays)))
}
}
+}
