We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7171072 commit 2ee0de7Copy full SHA for 2ee0de7
crates/extensions/tedge_flows/src/js_lib/text_decoder.rs
@@ -7,7 +7,6 @@ use rquickjs::JsLifetime;
7
use rquickjs::Object;
8
use rquickjs::Result;
9
use rquickjs::TypedArray;
10
-use std::borrow::Cow;
11
12
#[derive(Clone, Default, Trace, JsLifetime)]
13
#[rquickjs::class(frozen)]
@@ -71,10 +70,7 @@ impl<'js> TextDecoder {
71
70
.map_err(|err| Exception::throw_message(&ctx, &err.to_string()))?
72
.to_string()
73
} else {
74
- match String::from_utf8_lossy(bytes) {
75
- Cow::Owned(text) => text,
76
- Cow::Borrowed(text) => text.to_owned(),
77
- }
+ String::from_utf8_lossy(bytes).to_string()
78
};
79
80
Ok(text)
0 commit comments