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
Cannot pass &str to get_one() #3
Comments
This may or may not be difficult to fix. I'll see if I was too strict with that bound and can reduce it to make this code work. |
I cut 0.1.6 to fix this issue. I pushed an update to https://github.com/kurtbuilds/ormlite-issue that demos the fix. Unfortunately, AsRef is only one of the necessary bounds. The full signature needs to be something like: async fn get<'a>(pool: &SqlitePool, name: impl AsRef<str> + sqlx::Encode<'a, sqlx::Sqlite> + Send + Sync + sqlx::Type<sqlx::Sqlite> + 'a) -> Result<Example> You can of course name this collection of traits if you find yourself reusing it frequently. I'd like to find a better long term solution, whether thats exporting such trait groupings from ormlite, or finding a way to reduce the number of traits required altogether. |
Add Cuda support.
The following example fails to compile:
The error:
However, changing
name.as_ref()
intoname.as_ref().to_string()
fixes it.The text was updated successfully, but these errors were encountered: