mirror of
https://github.com/bspeice/speice.io
synced 2024-11-14 22:18:10 -05:00
Note about fallback async methods
This commit is contained in:
parent
ca386a4851
commit
d7a04fdcb4
@ -180,3 +180,9 @@ help: consider further restricting this bound
|
||||
15 | impl<R3: AsyncBufRead + ?Sized + std::marker::Unpin> Future for MyStruct<'_, R3> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
```
|
||||
|
||||
# Don't feel bad about fallbacks
|
||||
|
||||
When used sparingly, either `#[async_trait]` or `Box::pin(async move {})` can enable async
|
||||
functionality in code that will later not need the allocations. Use the escape hatch when you need
|
||||
to such that you can continue making incremental improvements later.
|
||||
|
Loading…
Reference in New Issue
Block a user