From 47bb788dc2cb6722081a3d607af3a3add36b1440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Mon, 28 Mar 2022 19:17:22 +0200 Subject: [PATCH] events: Rename ZoomLevel::value to get --- crates/ruma-common/src/events/location.rs | 2 +- crates/ruma-common/tests/events/location.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ruma-common/src/events/location.rs b/crates/ruma-common/src/events/location.rs index 83ee7c01..581aca90 100644 --- a/crates/ruma-common/src/events/location.rs +++ b/crates/ruma-common/src/events/location.rs @@ -149,7 +149,7 @@ impl ZoomLevel { } /// The value of this `ZoomLevel`. - pub fn value(&self) -> UInt { + pub fn get(&self) -> UInt { self.0 } } diff --git a/crates/ruma-common/tests/events/location.rs b/crates/ruma-common/tests/events/location.rs index 17f14b12..ef2b22a0 100644 --- a/crates/ruma-common/tests/events/location.rs +++ b/crates/ruma-common/tests/events/location.rs @@ -149,7 +149,7 @@ fn zoomlevel_deserialization_pass() { LocationContent { zoom_level: Some(zoom_level), .. - } if zoom_level.value() == uint!(16) + } if zoom_level.get() == uint!(16) ); } @@ -222,7 +222,7 @@ fn message_event_deserialization() { && message.find_html().is_none() && uri == "geo:51.5008,0.1247;u=35" && description == "Alice's whereabouts" - && zoom_level.value() == uint!(4) + && zoom_level.get() == uint!(4) && ts == MilliSecondsSinceUnixEpoch(uint!(1_636_829_458)) && origin_server_ts == MilliSecondsSinceUnixEpoch(uint!(134_829_848)) && room_id == room_id!("!roomid:notareal.hs")