Skip to content

Commit fca866d

Browse files
Update itoa and dirs (#1601)
1 parent beb2100 commit fca866d

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

Cargo.lock

Lines changed: 11 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sqlx-core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ crossbeam-queue = "0.3.1"
115115
crossbeam-channel = "0.5.0"
116116
crossbeam-utils = { version = "0.8.1", default-features = false }
117117
digest = { version = "0.9.0", default-features = false, optional = true, features = ["std"] }
118-
dirs = { version = "3.0.1", optional = true }
118+
dirs = { version = "4", optional = true }
119119
encoding_rs = { version = "0.8.23", optional = true }
120120
either = "1.5.3"
121121
futures-channel = { version = "0.3.5", default-features = false, features = ["sink", "alloc", "std"] }
@@ -125,7 +125,7 @@ futures-util = { version = "0.3.5", default-features = false, features = ["alloc
125125
generic-array = { version = "0.14.4", default-features = false, optional = true }
126126
hex = "0.4.2"
127127
hmac = { version = "0.11.0", default-features = false, optional = true }
128-
itoa = "0.4.5"
128+
itoa = "1"
129129
ipnetwork = { version = "0.17.0", default-features = false, optional = true }
130130
mac_address = { version = "1.1", default-features = false, optional = true }
131131
libc = "0.2.71"

sqlx-core/src/mssql/arguments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl MssqlArguments {
7272
self.name.push_str("@p");
7373

7474
self.ordinal += 1;
75-
let _ = itoa::fmt(&mut self.name, self.ordinal);
75+
self.name.push_str(itoa::Buffer::new().format(self.ordinal));
7676

7777
let MssqlArguments {
7878
ref name,

sqlx-core/src/mssql/protocol/type_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ impl TypeInfo {
567567
// size
568568
if self.size < 8000 && self.size > 0 {
569569
s.push_str("(");
570-
let _ = itoa::fmt(&mut *s, self.size);
570+
s.push_str(itoa::Buffer::new().format(self.size));
571571
s.push_str(")");
572572
} else {
573573
s.push_str("(max)");

sqlx-core/src/postgres/io/buf_mut.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl PgBufMutExt for Vec<u8> {
3333
// N.B. if you change this don't forget to update it in ../describe.rs
3434
self.extend(b"sqlx_s_");
3535

36-
itoa::write(&mut *self, id).unwrap();
36+
self.extend(itoa::Buffer::new().format(id).as_bytes());
3737

3838
self.push(0);
3939
}
@@ -44,7 +44,7 @@ impl PgBufMutExt for Vec<u8> {
4444
if let Some(id) = id {
4545
self.extend(b"sqlx_p_");
4646

47-
itoa::write(&mut *self, id).unwrap();
47+
self.extend(itoa::Buffer::new().format(id).as_bytes());
4848
}
4949

5050
self.push(0);

0 commit comments

Comments
 (0)