From b51dd2c427926b2ad1c828a74b131d21cc499aeb Mon Sep 17 00:00:00 2001 From: Anton Jansson Date: Mon, 30 Dec 2024 13:43:20 +0100 Subject: [PATCH] Change so that FieldTable::insert returns self to enable chained inserts. --- types/src/types.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/src/types.rs b/types/src/types.rs index 65a068b..1092cc1 100644 --- a/types/src/types.rs +++ b/types/src/types.rs @@ -250,8 +250,9 @@ impl From> for FieldArray { impl FieldTable { /// Insert a new entry in the table - pub fn insert(&mut self, k: ShortString, v: AMQPValue) { + pub fn insert(&mut self, k: ShortString, v: AMQPValue) -> &mut Self { self.0.insert(k, v); + self } /// Check whether the table contains the given key