Remove boxed in favor of pin. (#725)

This commit is contained in:
Christian Legnitto 2020-07-28 19:10:15 -10:00 committed by GitHub
parent c80cecf61e
commit 59419f1ec4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View file

@ -245,7 +245,7 @@ where
executor: &'a Executor<Self::Context, S>,
) -> crate::BoxFuture<'a, crate::ExecutionResult<S>> {
use futures::future;
future::FutureExt::boxed(future::ready(self.resolve(info, selection_set, executor)))
Box::pin(future::ready(self.resolve(info, selection_set, executor)))
}
}

View file

@ -472,7 +472,7 @@ impl ToTokens for UnionDefinition {
{ #expr },
executor.context()
);
return ::juniper::futures::future::FutureExt::boxed(async move {
return Box::pin(async move {
match res? {
Some((ctx, r)) => {
let subexec = executor.replaced_context(ctx);

View file

@ -880,8 +880,7 @@ impl GraphQLTypeDefiniton {
Err(e) => Err(e),
}
};
use ::juniper::futures::future;
future::FutureExt::boxed(f)
Box::pin(f)
},
)
} else {
@ -908,7 +907,7 @@ impl GraphQLTypeDefiniton {
Err(e) => Err(e),
};
use ::juniper::futures::future;
future::FutureExt::boxed(future::ready(v))
Box::pin(future::ready(v))
)
};
@ -1445,7 +1444,7 @@ impl GraphQLTypeDefiniton {
) -> ::juniper::BoxFuture<'a, ::juniper::ExecutionResult<#scalar>> {
use ::juniper::futures::future;
let v = ::juniper::GraphQLValue::resolve(self, info, selection_set, executor);
future::FutureExt::boxed(future::ready(v))
Box::pin(future::ready(v))
}
}
);