Skip to content

Commit

Permalink
chore: my_user -> current_user
Browse files Browse the repository at this point in the history
  • Loading branch information
alemidev committed Oct 15, 2024
1 parent 9a4225c commit 3bf620d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl Client {
}

/// Get the currently logged in user.
pub fn my_user(&self) -> &User {
pub fn current_user(&self) -> &User {
&self.0.user
}
}
8 changes: 4 additions & 4 deletions src/ffi/java/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ use crate::{
use jni_toolbox::jni;

/// Connect using the given credentials to the default server, and return a [Client] to interact with it.
#[jni(package = "mp.code", class = "Client", ptr)]
#[jni(package = "mp.code", class = "Client")]
fn connect(config: Config) -> Result<Client, ConnectionError> {
super::tokio().block_on(Client::connect(config))
}

/// Gets the current [crate::api::User].
#[jni(package = "mp.code", class = "Client", ptr)]
fn get_user(client: &mut Client) -> crate::api::User {
client.user().clone()
#[jni(package = "mp.code", class = "Client")]
fn current_user(client: &mut Client) -> crate::api::User {
client.current_user().clone()
}

/// Join a [Workspace] and return a pointer to it.
Expand Down

0 comments on commit 3bf620d

Please sign in to comment.