mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-13 06:20:02 -04:00
clippy
This commit is contained in:
parent
758b53b11c
commit
902442b7ba
1 changed files with 7 additions and 7 deletions
|
@ -369,21 +369,21 @@ impl WsTcp {
|
||||||
.replace_err("Failed to make define_property object for redirected")?,
|
.replace_err("Failed to make define_property object for redirected")?,
|
||||||
);
|
);
|
||||||
|
|
||||||
let rawHeaders = Object::new();
|
let raw_headers = Object::new();
|
||||||
for (k, v) in resp_headers_raw.iter() {
|
for (k, v) in resp_headers_raw.iter() {
|
||||||
if let Ok(jv) = Reflect::get(&rawHeaders, &jval!(k.to_string())) {
|
if let Ok(jv) = Reflect::get(&raw_headers, &jval!(k.to_string())) {
|
||||||
if jv.is_array() {
|
if jv.is_array() {
|
||||||
let arr = Array::from(&jv);
|
let arr = Array::from(&jv);
|
||||||
arr.push(&jval!(v.to_str().unwrap().to_string()));
|
arr.push(&jval!(v.to_str().unwrap().to_string()));
|
||||||
Reflect::set(&rawHeaders, &jval!(k.to_string()), &arr);
|
let _=Reflect::set(&raw_headers, &jval!(k.to_string()), &arr);
|
||||||
} else if !jv.is_falsy() {
|
} else if !jv.is_falsy() {
|
||||||
let arr = Array::new();
|
let arr = Array::new();
|
||||||
arr.push(&jv);
|
arr.push(&jv);
|
||||||
arr.push(&jval!(v.to_str().unwrap().to_string()));
|
arr.push(&jval!(v.to_str().unwrap().to_string()));
|
||||||
Reflect::set(&rawHeaders, &jval!(k.to_string()), &arr);
|
let _=Reflect::set(&raw_headers, &jval!(k.to_string()), &arr);
|
||||||
} else {
|
} else {
|
||||||
Reflect::set(
|
let _=Reflect::set(
|
||||||
&rawHeaders,
|
&raw_headers,
|
||||||
&jval!(k.to_string()),
|
&jval!(k.to_string()),
|
||||||
&jval!(v.to_str().unwrap().to_string()),
|
&jval!(v.to_str().unwrap().to_string()),
|
||||||
);
|
);
|
||||||
|
@ -393,7 +393,7 @@ impl WsTcp {
|
||||||
Object::define_property(
|
Object::define_property(
|
||||||
&resp,
|
&resp,
|
||||||
&jval!("rawHeaders"),
|
&jval!("rawHeaders"),
|
||||||
&utils::define_property_obj(jval!(&rawHeaders), false).replace_err("wjat!!")?,
|
&utils::define_property_obj(jval!(&raw_headers), false).replace_err("wjat!!")?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(resp)
|
Ok(resp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue