Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix example for boxed-any #63

Merged
merged 1 commit into from Dec 21, 2022

Conversation

smmoosavi
Copy link
Contributor

fix Clippy errors for async-graphql/async-graphql#1179

@sunli829 sunli829 merged commit f86120e into async-graphql:master Dec 21, 2022
@@ -227,7 +229,7 @@ pub fn schema() -> Result<Schema, SchemaError> {
let starwars = ctx.data::<StarWars>()?;
let humans = starwars.humans();
Ok(Some(FieldValue::list(
humans.into_iter().map(FieldValue::borrowed_any),
humans.into_iter().map(|v| FieldValue::borrowed_any(v)),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should change borrowed_any(obj: &'a (impl Any + Send + Sync)) to borrowed_any(obj: &'a (impl Any + Send + Sync + ?Send)) to avoid this unnecessary map calls?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants