This repository was archived by the owner on Jun 6, 2026. It is now read-only.
test: demo the implementation is not general enough issue - #22
Closed
tisonkun wants to merge 2 commits into
Closed
Conversation
tisonkun
commented
Feb 8, 2025
Comment on lines
+44
to
+73
| // #[test] | ||
| // fn test_lifetime_nok() { | ||
| // let rt1 = tokio::runtime::Runtime::new().unwrap(); | ||
| // let rt2 = tokio::runtime::Runtime::new().unwrap(); | ||
| // | ||
| // let spawn = rt1.spawn(async move { | ||
| // let mut interval = fastimer::interval(Duration::from_secs(1), timer()); | ||
| // for _ in 0..3 { | ||
| // interval.tick().await; | ||
| // } | ||
| // }); | ||
| // | ||
| // rt2.block_on(spawn).unwrap(); | ||
| // } |
Contributor
Author
There was a problem hiding this comment.
Failed to compile:
error: implementation of `MakeDelay` is not general enough
--> fastimer-tokio/tests/lifetime.rs:49:17
|
49 | let spawn = rt1.spawn(async move {
| _________________^
50 | | let mut interval = fastimer::interval(Duration::from_secs(1), timer());
51 | | for _ in 0..3 {
52 | | interval.tick().await;
53 | | }
54 | | });
| |______^ implementation of `MakeDelay` is not general enough
|
= note: `&'0 MakeTokioDelay` must implement `MakeDelay`, for any lifetime `'0`...
= note: ...but `MakeDelay` is actually implemented for the type `&'static MakeTokioDelay`
tisonkun
force-pushed
the
demo-lifetime-issue
branch
from
February 8, 2025 01:46
f246da5 to
df95a68
Compare
Signed-off-by: tison <wander4096@gmail.com>
tisonkun
force-pushed
the
demo-lifetime-issue
branch
from
February 8, 2025 01:48
df95a68 to
a49b2e0
Compare
Signed-off-by: tison <wander4096@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.