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

associated static items are not allowed #119

Open
gitmalong opened this issue Jul 3, 2022 · 1 comment
Open

associated static items are not allowed #119

gitmalong opened this issue Jul 3, 2022 · 1 comment

Comments

@gitmalong
Copy link

gitmalong commented Jul 3, 2022

      #[cached(
        convert = r##"{ format!("{}", address) }"##,
        type = "SizedCache<String, String>",
        create = "{ SizedCache::with_size(1000) }",
    )]
    async fn get_cached(
        address: String,
    ) -> String {
        Ok("test".to_string())
    }

--> associated static items are not allowedrustc

cached = { version = "0.34.1" }

Any idea?

@gitmalong
Copy link
Author

Root cause is #86 because my fn was within impl Block. Should be mentioned somewhere

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

No branches or pull requests

1 participant