Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
jsonrpsee
Commits
f5217b9c
Unverified
Commit
f5217b9c
authored
Dec 22, 2021
by
Niklas Adolfsson
Committed by
GitHub
Dec 22, 2021
Browse files
chore(http client): remove needless clone (#620)
parent
1e77c2df
Changes
1
Hide whitespace changes
Inline
Side-by-side
client/http-client/src/transport.rs
View file @
f5217b9c
...
...
@@ -95,9 +95,7 @@ impl HttpTransportClient {
return
Err
(
Error
::
RequestTooLarge
);
}
// NOTE(niklasad1): this annoying we could just take `&str` here but more user-friendly to check
// that the URI is well-formed in the constructor.
let
req
=
hyper
::
Request
::
post
(
self
.target
.clone
())
let
req
=
hyper
::
Request
::
post
(
&
self
.target
)
.header
(
hyper
::
header
::
CONTENT_TYPE
,
hyper
::
header
::
HeaderValue
::
from_static
(
CONTENT_TYPE_JSON
))
.header
(
hyper
::
header
::
ACCEPT
,
hyper
::
header
::
HeaderValue
::
from_static
(
CONTENT_TYPE_JSON
))
.body
(
From
::
from
(
body
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment