diff --git a/src/lib.rs b/src/lib.rs index bcae4278..90390721 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -138,17 +138,6 @@ impl HttpClient { session: Mutex::new(session), })) } - - /// Get a copy of the current `Session`, if any. - /// - /// Useful for serializing and persisting the session to be restored later. - pub fn session(&self) -> Option { - self.0 - .session - .lock() - .expect("session mutex was poisoned") - .clone() - } } /// Secured variant of the client (using HTTPS requests) @@ -188,6 +177,17 @@ where })) } + /// Get a copy of the current `Session`, if any. + /// + /// Useful for serializing and persisting the session to be restored later. + pub fn session(&self) -> Option { + self.0 + .session + .lock() + .expect("session mutex was poisoned") + .clone() + } + /// Log in with a username and password. /// /// In contrast to `api::r0::session::login::call()`, this method stores the