diff --git a/examples/examples/subscribe_runtime_updates.rs b/examples/examples/subscribe_runtime_updates.rs index bda2ee83a7..27a9830d8c 100644 --- a/examples/examples/subscribe_runtime_updates.rs +++ b/examples/examples/subscribe_runtime_updates.rs @@ -25,7 +25,7 @@ async fn main() -> Result<(), Box> { // Start a new tokio task to perform the runtime updates while // utilizing the API for other use cases. - let update_client = api.subscribe_to_updates(); + let update_client = api.updater(); tokio::spawn(async move { let result = update_client.perform_runtime_updates().await; println!("Runtime update failed with result={:?}", result); diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index 0fea1591a4..01ea563fbe 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -123,7 +123,7 @@ impl OnlineClient { /// /// // high level API. /// - /// let update_task = client.subscribe_to_updates(); + /// let update_task = client.updater(); /// tokio::spawn(async move { /// update_task.perform_runtime_updates().await; /// }); @@ -131,7 +131,7 @@ impl OnlineClient { /// /// // low level API. /// - /// let updater = client.subscribe_to_updates(); + /// let updater = client.updater(); /// tokio::spawn(async move { /// let mut update_stream = updater.runtime_updates().await.unwrap(); /// @@ -150,7 +150,7 @@ impl OnlineClient { /// }); /// # } /// ``` - pub fn subscribe_to_updates(&self) -> ClientRuntimeUpdater { + pub fn updater(&self) -> ClientRuntimeUpdater { ClientRuntimeUpdater(self.clone()) } @@ -234,7 +234,7 @@ impl OnlineClientT for OnlineClient { } } -/// Client wrapper for performing runtime updates. See [`OnlineClient::subscribe_to_updates()`] +/// Client wrapper for performing runtime updates. See [`OnlineClient::updater()`] /// for example usage. pub struct ClientRuntimeUpdater(OnlineClient);