Skip to content

Commit d7ce32b

Browse files
committed
Changed string packing for variable expressions
1 parent 33626fb commit d7ce32b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/expressions/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ impl FilterExpression {
174174
let mut size = 0;
175175
if let Some(val) = &self.val {
176176
// DEF expression
177-
size += pack_value(buf, val)?;
177+
size += pack_raw_string(buf, &val.to_string())?;
178178
size += exps[0].pack(buf)?;
179179
} else {
180180
// Normal Expressions
@@ -272,10 +272,10 @@ impl FilterExpression {
272272
// The name - Raw String is needed instead of the msgpack String that the pack_value method would use.
273273
size += pack_raw_string(buf, &self.val.clone().unwrap().to_string())?;
274274
}
275-
ExpOp::BinType => {
276-
// BinType encoder
275+
ExpOp::BinType | ExpOp::Var => {
276+
// BinType/Var encoder
277277
size += pack_array_begin(buf, 2)?;
278-
// BinType Operation
278+
// BinType/Var Operation
279279
size += pack_integer(buf, cmd as i64)?;
280280
// The name - Raw String is needed instead of the msgpack String that the pack_value method would use.
281281
size += pack_raw_string(buf, &self.val.clone().unwrap().to_string())?;

0 commit comments

Comments
 (0)