@@ 142,9 142,12 @@ impl User {
/// Prompts user to choose a session from a numbered list.
///
- /// `sessions` is assumed to have been gathered by
- /// [`find_sessions`](crate::session::find_sessions) and hence be non-empty. If `sessions` has
- /// one item, it will be returned automatically.
+ /// If `sessions` has one item, it will be returned automatically.
+ ///
+ /// # Panics
+ ///
+ /// Panics if `sessions` is empty. Providing a non-empty list is up to
+ /// [`find_sessions`](crate::session::find_sessions).
pub fn choose_session(&self, sessions: &[Desktop], xdg: &BaseDirectories) -> Result<Desktop> {
if sessions.is_empty() {
panic!("choose_session() cannot choose among zero sessions");