mirror of https://github.com/stjepang/smol
small tweaks
This commit is contained in:
parent
ba4c816545
commit
0f2973b669
|
@ -4,8 +4,8 @@
|
|||
* Fast - TODO
|
||||
* Safe - Written fully in safe Rust.
|
||||
* Portable - Works on Linux, macOS, iOS, and Windows.
|
||||
* Documented - Easy to tweak for custom use cases!
|
||||
* Lightweight - Built from scratch, hooks directly into epoll/kqueue/wepoll.
|
||||
* Documented - Easy to tweak for custom use cases!
|
||||
* Networking - Provides async TCP, UDP, and Unix domain sockets.
|
||||
* Executor - Configurable and with built-in work stealing.
|
||||
* Blocking - TODO
|
||||
|
|
|
@ -103,7 +103,7 @@ impl<T> Async<T> {
|
|||
}
|
||||
|
||||
/// Turns a non-blocking read into an async operation.
|
||||
async fn read_with<'a, R>(
|
||||
pub async fn read_with<'a, R>(
|
||||
&'a self,
|
||||
mut f: impl FnMut(&'a T) -> io::Result<R>,
|
||||
) -> io::Result<R> {
|
||||
|
@ -111,7 +111,7 @@ impl<T> Async<T> {
|
|||
}
|
||||
|
||||
/// Turns a non-blocking write into an async operation.
|
||||
async fn write_with<'a, R>(
|
||||
pub async fn write_with<'a, R>(
|
||||
&'a self,
|
||||
mut f: impl FnMut(&'a T) -> io::Result<R>,
|
||||
) -> io::Result<R> {
|
||||
|
|
Loading…
Reference in New Issue