From 1d2dfe3fe136cd2b0219f4537897faf0631142e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Sun, 9 Aug 2020 04:27:06 +0200 Subject: [PATCH] aquatic_ws_protocol: add comment OutMessage::from_ws_message --- aquatic_ws_protocol/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aquatic_ws_protocol/src/lib.rs b/aquatic_ws_protocol/src/lib.rs index 008be43..40d4d16 100644 --- a/aquatic_ws_protocol/src/lib.rs +++ b/aquatic_ws_protocol/src/lib.rs @@ -304,6 +304,8 @@ impl OutMessage { _ => return Err(anyhow::anyhow!("Message is neither text nor bytes")), }; + // This is brittle and could fail, but it doesn't matter too much + // since this function is only used in load tester if text.contains("answer"){ Ok(Self::Answer(::serde_json::from_str(&text)?)) } else if text.contains("offer"){