Skip to content

Commit 23aeaea

Browse files
committed
Remove some redundant async fn declarations
These fns are not, in fact, async.
1 parent 9a9e467 commit 23aeaea

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/machine.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ impl OlmMachine {
13331333
/// `callback` should be a function that takes a single argument (an array
13341334
/// of {@link RoomKeyInfo}) and returns a Promise.
13351335
#[wasm_bindgen(js_name = "registerRoomKeyUpdatedCallback")]
1336-
pub async fn register_room_key_updated_callback(&self, callback: Function) {
1336+
pub fn register_room_key_updated_callback(&self, callback: Function) {
13371337
let stream = self.inner.store().room_keys_received_stream();
13381338

13391339
copy_stream_to_callback(
@@ -1358,7 +1358,7 @@ impl OlmMachine {
13581358
/// `callback` should be a function that takes a single argument (an array
13591359
/// of {@link RoomKeyWithheldInfo}) and returns a Promise.
13601360
#[wasm_bindgen(js_name = "registerRoomKeysWithheldCallback")]
1361-
pub async fn register_room_keys_withheld_callback(&self, callback: Function) {
1361+
pub fn register_room_keys_withheld_callback(&self, callback: Function) {
13621362
let stream = self.inner.store().room_keys_withheld_received_stream();
13631363

13641364
copy_stream_to_callback(
@@ -1383,7 +1383,7 @@ impl OlmMachine {
13831383
/// `callback` should be a function that takes a single argument (a {@link
13841384
/// UserId}) and returns a Promise.
13851385
#[wasm_bindgen(js_name = "registerUserIdentityUpdatedCallback")]
1386-
pub async fn register_user_identity_updated_callback(&self, callback: Function) {
1386+
pub fn register_user_identity_updated_callback(&self, callback: Function) {
13871387
let stream = self.inner.store().identities_stream_raw();
13881388

13891389
copy_stream_to_callback(
@@ -1406,7 +1406,7 @@ impl OlmMachine {
14061406
/// `callback` should be a function that takes a single argument (an array
14071407
/// of user IDs as strings) and returns a Promise.
14081408
#[wasm_bindgen(js_name = "registerDevicesUpdatedCallback")]
1409-
pub async fn register_devices_updated_callback(&self, callback: Function) {
1409+
pub fn register_devices_updated_callback(&self, callback: Function) {
14101410
let stream = self.inner.store().identities_stream_raw();
14111411

14121412
fn mapper(changes: (IdentityChanges, DeviceChanges)) -> iter::Once<Array> {
@@ -1454,7 +1454,7 @@ impl OlmMachine {
14541454
/// secret inbox should be cleared by calling
14551455
/// `delete_secrets_from_inbox`.
14561456
#[wasm_bindgen(js_name = "registerReceiveSecretCallback")]
1457-
pub async fn register_receive_secret_callback(&self, callback: Function) {
1457+
pub fn register_receive_secret_callback(&self, callback: Function) {
14581458
let stream = self.inner.store().secrets_stream();
14591459
// fire up a promise chain which will call `callback` on each result from the
14601460
// stream
@@ -1487,7 +1487,7 @@ impl OlmMachine {
14871487
/// If the secret is valid and handled, the secret inbox should be cleared
14881488
/// by calling `delete_secrets_from_inbox`.
14891489
#[wasm_bindgen(js_name = "getSecretsFromInbox")]
1490-
pub async fn get_secrets_from_inbox(&self, secret_name: String) -> Promise {
1490+
pub fn get_secrets_from_inbox(&self, secret_name: String) -> Promise {
14911491
let set = Set::new(&JsValue::UNDEFINED);
14921492
let me = self.inner.clone();
14931493

@@ -1509,7 +1509,7 @@ impl OlmMachine {
15091509
///
15101510
/// * `secret_name` - The name of the secret to delete.
15111511
#[wasm_bindgen(js_name = "deleteSecretsFromInbox")]
1512-
pub async fn delete_secrets_from_inbox(&self, secret_name: String) -> Promise {
1512+
pub fn delete_secrets_from_inbox(&self, secret_name: String) -> Promise {
15131513
let me = self.inner.clone();
15141514
future_to_promise(async move {
15151515
let name = SecretName::from(secret_name);
@@ -1534,7 +1534,7 @@ impl OlmMachine {
15341534
/// A `Promise` for a `bool` result, which will be true if secrets were
15351535
/// missing, and a request was generated.
15361536
#[wasm_bindgen(js_name = "requestMissingSecretsIfNeeded")]
1537-
pub async fn request_missing_secrets_if_needed(&self) -> Promise {
1537+
pub fn request_missing_secrets_if_needed(&self) -> Promise {
15381538
let me = self.inner.clone();
15391539
future_to_promise(async move {
15401540
let has_missing_secrets = me.query_missing_secrets_from_other_sessions().await?;

0 commit comments

Comments
 (0)