From ba8743f461b09c35863754a6182530048adc37b6 Mon Sep 17 00:00:00 2001 From: modeco80 Date: Wed, 19 Jun 2024 02:34:38 -0400 Subject: [PATCH] guac-rs: remove commented dead code gits a SCM. --- guac-rs/src/lib.rs | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/guac-rs/src/lib.rs b/guac-rs/src/lib.rs index 95063e4..2d7f623 100644 --- a/guac-rs/src/lib.rs +++ b/guac-rs/src/lib.rs @@ -22,7 +22,7 @@ fn guac_decode_impl<'a>(cx: &mut FunctionContext<'a>) -> JsResult<'a, JsArray> { } Err(e) => { - let err = cx.string(format!("Error decoding guacamole: {}", e)); + let err = cx.string(format!("{}", e)); return cx.throw(err); } } @@ -37,28 +37,6 @@ fn guac_encode_impl<'a>(cx: &mut FunctionContext<'a>) -> JsResult<'a, JsString> elements.push(input); } - // old array stuff - /* - let input = cx.argument::(0)?; - let raw_elements = input.to_vec(cx)?; - - // bleh - let vecres: Result, _> = raw_elements - .iter() - .map(|item| match item.to_string(cx) { - Ok(s) => { - return Ok(s.value(cx)); - } - - Err(e) => { - return Err(e); - } - }) - .collect(); - - let vec = vecres?; - */ - Ok(cx.string(guac::encode_instruction(&elements))) }