Skip to content

Commit 06de6c8

Browse files
committed
Allow empty query arguments
This allows values like `b""` or `b" "` to be passed as these are legal argument sizes (or arguments) for the server.
1 parent 64e68d6 commit 06de6c8

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,6 @@ impl Query {
425425
self
426426
}
427427
pub(in crate) fn _push_arg(&mut self, arg: Vec<u8>) {
428-
if arg.is_empty() {
429-
panic!("Argument cannot be empty")
430-
}
431428
// A data element will look like:
432429
// `<bytes_in_next_line>\n<data>`
433430
let bytes_in_next_line = arg.len().to_string().into_bytes();
@@ -447,10 +444,6 @@ impl Query {
447444
/// ## Panics
448445
/// This method will panic if the passed `arg` is empty
449446
pub fn push(&mut self, arg: impl IntoSkyhashAction) {
450-
assert!(
451-
arg.incr_len_by() != 0,
452-
"An argument passed to a query cannot be empty!"
453-
);
454447
arg.push_into_query(self);
455448
}
456449
pub(in crate) fn _push_alt_iter<T, U>(

0 commit comments

Comments
 (0)