aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/body.rs
diff options
context:
space:
mode:
authorOluwatobi Sofela <60105594+oluwatobiss@users.noreply.github.com>2024-03-21 18:48:54 +0100
committerGitHub <noreply@github.com>2024-03-21 17:48:54 +0000
commit3e63f8d6ee0dbd7934a0cb05753820676b89c61d (patch)
tree4c8a4918ba1c320fe42c8fec4d2ebc21f82e7463 /components/script/body.rs
parent694e86ecffb882f6d5934eb620257e9fceddbca8 (diff)
downloadservo-3e63f8d6ee0dbd7934a0cb05753820676b89c61d.tar.gz
servo-3e63f8d6ee0dbd7934a0cb05753820676b89c61d.zip
clippy: Fix needless borrow warnings (#31813)
Diffstat (limited to 'components/script/body.rs')
-rw-r--r--components/script/body.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/body.rs b/components/script/body.rs
index f2d9347e070..e585c1287c5 100644
--- a/components/script/body.rs
+++ b/components/script/body.rs
@@ -453,7 +453,7 @@ impl Extractable for BodyInit {
BodyInit::ArrayBuffer(ref typedarray) => {
let bytes = typedarray.to_vec();
let total_bytes = bytes.len();
- let stream = ReadableStream::new_from_bytes(&global, bytes);
+ let stream = ReadableStream::new_from_bytes(global, bytes);
Ok(ExtractedBody {
stream,
total_bytes: Some(total_bytes),
@@ -464,7 +464,7 @@ impl Extractable for BodyInit {
BodyInit::ArrayBufferView(ref typedarray) => {
let bytes = typedarray.to_vec();
let total_bytes = bytes.len();
- let stream = ReadableStream::new_from_bytes(&global, bytes);
+ let stream = ReadableStream::new_from_bytes(global, bytes);
Ok(ExtractedBody {
stream,
total_bytes: Some(total_bytes),
@@ -497,7 +497,7 @@ impl Extractable for Vec<u8> {
fn extract(&self, global: &GlobalScope) -> Fallible<ExtractedBody> {
let bytes = self.clone();
let total_bytes = self.len();
- let stream = ReadableStream::new_from_bytes(&global, bytes);
+ let stream = ReadableStream::new_from_bytes(global, bytes);
Ok(ExtractedBody {
stream,
total_bytes: Some(total_bytes),
@@ -531,7 +531,7 @@ impl Extractable for DOMString {
let bytes = self.as_bytes().to_owned();
let total_bytes = bytes.len();
let content_type = Some(DOMString::from("text/plain;charset=UTF-8"));
- let stream = ReadableStream::new_from_bytes(&global, bytes);
+ let stream = ReadableStream::new_from_bytes(global, bytes);
Ok(ExtractedBody {
stream,
total_bytes: Some(total_bytes),
@@ -550,7 +550,7 @@ impl Extractable for FormData {
"multipart/form-data;boundary={}",
boundary
)));
- let stream = ReadableStream::new_from_bytes(&global, bytes);
+ let stream = ReadableStream::new_from_bytes(global, bytes);
Ok(ExtractedBody {
stream,
total_bytes: Some(total_bytes),
@@ -567,7 +567,7 @@ impl Extractable for URLSearchParams {
let content_type = Some(DOMString::from(
"application/x-www-form-urlencoded;charset=UTF-8",
));
- let stream = ReadableStream::new_from_bytes(&global, bytes);
+ let stream = ReadableStream::new_from_bytes(global, bytes);
Ok(ExtractedBody {
stream,
total_bytes: Some(total_bytes),