Skip to content

Commit

Permalink
refactor: rename try_data to custom_data
Browse files Browse the repository at this point in the history
  • Loading branch information
kitgxrl committed May 15, 2024
1 parent fd8012b commit d18cb8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion socketio/src/asynchronous/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl Client {
/// Attempts to fetch data given by [`ClientBuilder::data`]
///
/// None is returned if data was not given or data does not match [`ClientBuilder::data`]
pub fn try_data<D: Send + Sync + 'static>(&self) -> Option<Arc<D>> {
pub fn custom_data<D: Send + Sync + 'static>(&self) -> Option<Arc<D>> {
Arc::clone(&self.data).downcast().ok()
}

Expand Down
2 changes: 1 addition & 1 deletion socketio/src/client/raw_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl RawClient {
/// Attempts to fetch data given by [`ClientBuilder::data`]
///
/// None is returned if data was not given or data does not match [`ClientBuilder::data`]
pub fn try_data<D: Send + Sync + 'static>(&self) -> Option<Arc<D>> {
pub fn custom_data<D: Send + Sync + 'static>(&self) -> Option<Arc<D>> {
Arc::clone(&self.data).downcast().ok()
}

Expand Down

0 comments on commit d18cb8f

Please sign in to comment.