Skip to content

Commit 0c238d6

Browse files
committed
Return attributes as Option<&T>
1 parent d283298 commit 0c238d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/message.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ impl EncodedMessage {
2222
base64::decode(&self.data)
2323
}
2424

25-
pub fn attributes(&self) -> &Option<HashMap<String, String>> {
26-
&self.attributes
25+
pub fn attributes(&self) -> Option<&HashMap<String, String>> {
26+
self.attributes.as_ref()
2727
}
2828

2929
pub fn new<T: serde::Serialize>(data: &T, attributes: Option<HashMap<String, String>>) -> Self {

0 commit comments

Comments
 (0)