Skip to content

Commit 8de24d5

Browse files
committed
Remove workaround for ruma/ruma#1940
1 parent 0cc96ae commit 8de24d5

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/identifiers.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,7 @@ impl DeviceKeyId {
120120
/// Returns device ID of the device key ID.
121121
#[wasm_bindgen(getter, js_name = "deviceId")]
122122
pub fn device_id(&self) -> DeviceId {
123-
// TODO: when https://github.com/ruma/ruma/issues/1940 is fixed,
124-
// this should just be:
125-
//self.inner.key_name().to_owned().into()
126-
127-
let key_id = self.inner.to_string();
128-
129-
let colon_pos =
130-
key_id.find(":").expect("Key should not have parsed if it did not contain ':'");
131-
132-
DeviceId::new(&key_id[(colon_pos + 1)..])
123+
self.inner.key_name().to_owned().into()
133124
}
134125

135126
/// Return the device key ID as a string.

0 commit comments

Comments
 (0)