diff --git a/src/accessor/aio.rs b/src/accessor/aio.rs index 009766a..3cedc72 100644 --- a/src/accessor/aio.rs +++ b/src/accessor/aio.rs @@ -13,7 +13,7 @@ use std::sync::Arc; use std::task::{Context, Poll}; use crate::accessor::{self, cache::Cache, ReadAt}; -use crate::decoder::Decoder; +use crate::decoder::aio::Decoder; use crate::format::GoodbyeItem; use crate::poll_fn::poll_fn; use crate::Entry; diff --git a/src/decoder/aio.rs b/src/decoder/aio.rs index 0b50b16..e212c5e 100644 --- a/src/decoder/aio.rs +++ b/src/decoder/aio.rs @@ -51,6 +51,12 @@ impl Decoder { }) } + /// Internal helper for `Accessor`. In this case we have the low-level state machine, and the + /// layer "above" the `Accessor` propagates the actual type (sync vs async). + pub(crate) fn from_impl(inner: decoder::DecoderImpl) -> Self { + Self { inner } + } + /// If this is a directory entry, get the next item inside the directory. pub async fn next(&mut self) -> Option> { self.inner.next_do().await.transpose()