From 55f27a9e0a26256e725d1c93805c2359ba027fa0 Mon Sep 17 00:00:00 2001 From: awiouy Date: Sat, 10 Feb 2018 10:22:03 +0100 Subject: [PATCH] core API: SessionWeak.try_upgrade(), SessionWeak.upgrade() --- core/src/session.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/session.rs b/core/src/session.rs index 4eecbe95..9fe785ed 100644 --- a/core/src/session.rs +++ b/core/src/session.rs @@ -213,11 +213,11 @@ impl Session { pub struct SessionWeak(pub Weak); impl SessionWeak { - pub fn try_upgrade(&self) -> Option { + fn try_upgrade(&self) -> Option { self.0.upgrade().map(Session) } - pub fn upgrade(&self) -> Session { + pub(crate) fn upgrade(&self) -> Session { self.try_upgrade().expect("Session died") } }