Skip to content

Commit db409c9

Browse files
committed
Fix an outdated docstring on identity and try_identity in the Rust SDK
Since we changed from `with_credentials` to `with_token`, the Rust client SDK no longer knows its `Identity` prior to `on_connect`, even when the connection is not anonymous.
1 parent c522c0f commit db409c9

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

crates/sdk/src/db_context.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,15 @@ pub trait DbContext {
5151

5252
/// Get the [`Identity`] of this connection.
5353
///
54-
/// This method panics if the connection was constructed anonymously
55-
/// and we have not yet received our newly-generated [`Identity`] from the host.
54+
/// This method panics if we have not yet received our [`Identity`] from the host.
5655
/// For a non-panicking version, see [`Self::try_identity`].
5756
fn identity(&self) -> Identity {
5857
self.try_identity().unwrap()
5958
}
6059

6160
/// Get the [`Identity`] of this connection.
6261
///
63-
/// This method returns `None` if the connection was constructed anonymously
64-
/// and we have not yet received our newly-generated [`Identity`] from the host.
62+
/// This method returns `None` if we have not yet received our [`Identity`] from the host.
6563
/// For a panicking version, see [`Self::identity`].
6664
fn try_identity(&self) -> Option<Identity>;
6765

0 commit comments

Comments
 (0)