Skip to content

Commit

Permalink
impl std::ops::Deref for AsyncSession
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Sep 2, 2024
1 parent fcf4344 commit 91dfe40
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/async_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ pub struct AsyncSession {
read_state: ReadState,
}

impl std::ops::Deref for AsyncSession {
type Target = crate::session::Session;

fn deref(&self) -> &Self::Target {
&self.session
}
}

impl From<Arc<crate::session::Session>> for AsyncSession {
fn from(session: Arc<crate::session::Session>) -> Self {
Self {
Expand Down

0 comments on commit 91dfe40

Please sign in to comment.