rename subscribe_to_updates() to updater() (#792)

This commit is contained in:
kylezs
2023-01-18 21:05:16 +11:00
committed by GitHub
parent e036087db7
commit 8ef80638d0
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -123,7 +123,7 @@ impl<T: Config> OnlineClient<T> {
///
/// // 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<T: Config> OnlineClient<T> {
///
/// // 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<T: Config> OnlineClient<T> {
/// });
/// # }
/// ```
pub fn subscribe_to_updates(&self) -> ClientRuntimeUpdater<T> {
pub fn updater(&self) -> ClientRuntimeUpdater<T> {
ClientRuntimeUpdater(self.clone())
}
@@ -234,7 +234,7 @@ impl<T: Config> OnlineClientT<T> for OnlineClient<T> {
}
}
/// 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<T: Config>(OnlineClient<T>);