slawlor / ractor

Rust actor framework
MIT License
1.3k stars 66 forks source link

Relax `Fn` bound to `FnOnce` on the message builder argument to `ractor::time::send_after` #224

Closed romac closed 3 months ago

romac commented 3 months ago

Because msg is only invoked at most once, its Fn bound could be relaxed to FnOnce. In some cases, this would avoid forcing callers to either clone or wrap in an Arc the data captured by the message builder closure.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.47%. Comparing base (8c310e7) to head (3bca5ed). Report is 13 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #224 +/- ## ========================================== + Coverage 79.73% 81.47% +1.73% ========================================== Files 50 50 Lines 9790 9483 -307 ========================================== - Hits 7806 7726 -80 + Misses 1984 1757 -227 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.