Skip to content

Commit 3d2c852

Browse files
Merge pull request #25 from CleverCloud/devel/fdubois/chore/serde-json
Update serde_json dependendecy
2 parents 9c0c762 + 2192cab commit 3d2c852

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ lazy_static = { version = "^1.4.0", optional = true }
3333
log = { version = "^0.4.17", optional = true }
3434
prometheus = { version = "^0.13.1", optional = true }
3535
serde = { version = "^1.0.137", features = ["derive"], optional = true }
36-
serde_json = { version = "^1.0.81", features = [
36+
serde_json = { version = "^1.0.82", features = [
3737
"preserve_order",
3838
"float_roundtrip",
3939
], optional = true }

src/client/proxy.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! with proxy capabilities
55
66
use std::{
7-
fmt::{self, Debug, Display, Formatter},
7+
fmt::{self, Debug, Display, Formatter, Write},
88
marker::PhantomData,
99
net::IpAddr,
1010
str::FromStr,
@@ -40,6 +40,8 @@ pub enum Error {
4040
ParseDirect(String),
4141
#[error("failed to parse '{0}' as url, {1}")]
4242
ParseUrl(String, url::ParseError),
43+
#[error("failed to format query params in url, {0}")]
44+
FormatUrl(fmt::Error),
4345
}
4446

4547
// -----------------------------------------------------------------------------
@@ -262,7 +264,7 @@ impl ProxyBuilder {
262264

263265
let mut p_and_q = url.path().to_string();
264266
if let Some(q) = url.query() {
265-
p_and_q += &format!("?{}", q);
267+
write!(p_and_q, "?{}", q).map_err(Error::FormatUrl)?;
266268
}
267269

268270
let uri = Uri::builder()

0 commit comments

Comments
 (0)