tustvold commented on issue #1128: URL: https://github.com/apache/arrow-rs/issues/1128#issuecomment-1004081792
Perhaps `fn as_primitive_array<T>(arr: &impl AsRef<dyn Array>) -> &PrimitiveArray<T>`? If you explicitly specify the lifetimes it is easier to see what the compiler is complaining about `fn as_primitive_array<'a, T>(arr: &'a impl AsRef<dyn Array>) -> &'a PrimitiveArray<T>` In the version without an argument passed by reference there is nothing to automatically infer the return lifetime from, and so the compiler is asking you to specify a named lifetime parameter. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
