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

remove free lifetime in handler service #119

Merged
merged 1 commit into from
Dec 1, 2021
Merged

Conversation

aliemjay
Copy link
Contributor

@aliemjay aliemjay commented Dec 1, 2021

'static should do the job

`'static` should be enough
@fakeshadow
Copy link
Collaborator

Thanks. It keeps getting cleaner.

@aliemjay
Copy link
Contributor Author

aliemjay commented Dec 1, 2021

I've just been trying to make transform_fn accept &Service and remove the clone bound using AsyncFn trait but it turned out that it worked only for function pointers/items ; closures show implementation is not general enough and require type annotations, unfortunately:
rust-lang/rust#70263
rust-lang/rust#58052
rust-lang/rust#81326

@fakeshadow
Copy link
Collaborator

I've just been trying to make transform_fn accept &Service and remove the clone bound using AsyncFn trait but it turned out that it worked only for function pointers/items ; closures show implementation is not general enough and require type annotations, unfortunately: rust-lang/rust#70263 rust-lang/rust#58052 rust-lang/rust#81326

Yea I tried it the other day and got the same error. Guess a clone is what we can have for now.

@fakeshadow fakeshadow merged commit 5e38c4e into HFQR:main Dec 1, 2021
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.

2 participants