Skip to content

Retrying with context for when and notify#55

Closed
BlueGlassBlock wants to merge 4 commits intoXuanwo:mainfrom
BlueGlassBlock:notify-context
Closed

Retrying with context for when and notify#55
BlueGlassBlock wants to merge 4 commits intoXuanwo:mainfrom
BlueGlassBlock:notify-context

Conversation

@BlueGlassBlock
Copy link
Contributor

Another approach to #39, see #54

@BlueGlassBlock
Copy link
Contributor Author

BlueGlassBlock commented May 18, 2023

Currently the problem is that when requires fn(&E) -> bool while the field requires fn(&E, &C) -> bool which cannot be casted to.

The same applies to notify.

@Xuanwo
Copy link
Owner

Xuanwo commented May 18, 2023

Currently the problem is that when requires fn(&E) -> bool while the field requires fn(&E, &C) -> bool which cannot be casted to.

Can we set the when to |err, _| f(err)?

@BlueGlassBlock
Copy link
Contributor Author

Can we set the when to |err, _| f(err)?

Unfortunately, no, since it's a fn: cannot capture anything even using move

Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo
Copy link
Owner

Xuanwo commented May 18, 2023

I have some new ideas, but it's shortcome is that we need to implment call for differnt compose of C, RF and NF. Do you have better solutions?

Xuanwo added 2 commits May 18, 2023 20:43
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo
Copy link
Owner

Xuanwo commented May 18, 2023

I have some new ideas, but it's shortcome is that we need to implment call for differnt compose of C, RF and NF. Do you have better solutions?

Ok, I fixed it.

@BlueGlassBlock
Copy link
Contributor Author

Wow, type gymnastics saved the world again 😂

@Xuanwo
Copy link
Owner

Xuanwo commented May 19, 2023

Replaced by #54

@Xuanwo Xuanwo closed this May 19, 2023
@BlueGlassBlock BlueGlassBlock deleted the notify-context branch May 19, 2023 05:09
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