Replace futures::future::FutureExt::boxed
with Box::pin
This commit is contained in:
parent
c270c038ef
commit
045c1870ef
4 changed files with 15 additions and 15 deletions
|
@ -432,7 +432,7 @@ macro_rules! graphql_scalar {
|
|||
use $crate::GraphQLType;
|
||||
use futures::future;
|
||||
let v = self.resolve(info, selection_set, executor);
|
||||
future::FutureExt::boxed(future::ready(v))
|
||||
Box::pin(future::ready(v))
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -99,7 +99,7 @@ where
|
|||
match field_name {
|
||||
"__schema" | "__type" => {
|
||||
let v = self.resolve_field(info, field_name, arguments, executor);
|
||||
ready(v).boxed()
|
||||
Box::pin(ready(v))
|
||||
}
|
||||
_ => self
|
||||
.query_type
|
||||
|
|
|
@ -60,9 +60,12 @@ where
|
|||
'e: 'a,
|
||||
for<'b> &'b S: ScalarRefValue<'b>,
|
||||
{
|
||||
use futures::future::FutureExt;
|
||||
|
||||
resolve_selection_set_into_async_recursive(instance, info, selection_set, executor).boxed()
|
||||
Box::pin(resolve_selection_set_into_async_recursive(
|
||||
instance,
|
||||
info,
|
||||
selection_set,
|
||||
executor,
|
||||
))
|
||||
}
|
||||
|
||||
struct AsyncField<S> {
|
||||
|
@ -89,10 +92,7 @@ where
|
|||
CtxT: Send + Sync,
|
||||
for<'b> &'b S: ScalarRefValue<'b>,
|
||||
{
|
||||
use futures::{
|
||||
future::FutureExt,
|
||||
stream::{FuturesOrdered, StreamExt},
|
||||
};
|
||||
use futures::stream::{FuturesOrdered, StreamExt};
|
||||
|
||||
let mut object = Object::with_capacity(selection_set.len());
|
||||
|
||||
|
@ -183,7 +183,7 @@ where
|
|||
value,
|
||||
})
|
||||
};
|
||||
async_values.push(field_future.boxed());
|
||||
async_values.push(Box::pin(field_future));
|
||||
}
|
||||
Selection::FragmentSpread(Spanning {
|
||||
item: ref spread, ..
|
||||
|
@ -206,7 +206,7 @@ where
|
|||
.await;
|
||||
AsyncValue::Nested(value)
|
||||
};
|
||||
async_values.push(f.boxed());
|
||||
async_values.push(Box::pin(f));
|
||||
}
|
||||
Selection::InlineFragment(Spanning {
|
||||
item: ref fragment,
|
||||
|
@ -250,7 +250,7 @@ where
|
|||
.await;
|
||||
AsyncValue::Nested(value)
|
||||
};
|
||||
async_values.push(f.boxed());
|
||||
async_values.push(Box::pin(f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -272,7 +272,7 @@ where
|
|||
executor: &'a Executor<Self::Context, S>,
|
||||
) -> crate::BoxFuture<'a, Value<S>> {
|
||||
let f = resolve_into_list_async(executor, info, self.iter());
|
||||
futures::future::FutureExt::boxed(f)
|
||||
Box::pin(f)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,7 @@ where
|
|||
executor: &'a Executor<Self::Context, S>,
|
||||
) -> crate::BoxFuture<'a, Value<S>> {
|
||||
let f = resolve_into_list_async(executor, info, self.iter());
|
||||
futures::future::FutureExt::boxed(f)
|
||||
Box::pin(f)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -317,6 +317,6 @@ where
|
|||
None => Value::null(),
|
||||
}
|
||||
};
|
||||
futures::future::FutureExt::boxed(f)
|
||||
Box::pin(f)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue