Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update itoa and dirs #1601

Merged
merged 1 commit into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sqlx-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ crossbeam-queue = "0.3.1"
crossbeam-channel = "0.5.0"
crossbeam-utils = { version = "0.8.1", default-features = false }
digest = { version = "0.9.0", default-features = false, optional = true, features = ["std"] }
dirs = { version = "3.0.1", optional = true }
dirs = { version = "4", optional = true }
encoding_rs = { version = "0.8.23", optional = true }
either = "1.5.3"
futures-channel = { version = "0.3.5", default-features = false, features = ["sink", "alloc", "std"] }
Expand All @@ -125,7 +125,7 @@ futures-util = { version = "0.3.5", default-features = false, features = ["alloc
generic-array = { version = "0.14.4", default-features = false, optional = true }
hex = "0.4.2"
hmac = { version = "0.11.0", default-features = false, optional = true }
itoa = "0.4.5"
itoa = "1"
ipnetwork = { version = "0.17.0", default-features = false, optional = true }
mac_address = { version = "1.1", default-features = false, optional = true }
libc = "0.2.71"
Expand Down
2 changes: 1 addition & 1 deletion sqlx-core/src/mssql/arguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl MssqlArguments {
self.name.push_str("@p");

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

let MssqlArguments {
ref name,
Expand Down
2 changes: 1 addition & 1 deletion sqlx-core/src/mssql/protocol/type_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ impl TypeInfo {
// size
if self.size < 8000 && self.size > 0 {
s.push_str("(");
let _ = itoa::fmt(&mut *s, self.size);
s.push_str(itoa::Buffer::new().format(self.size));
s.push_str(")");
} else {
s.push_str("(max)");
Expand Down
4 changes: 2 additions & 2 deletions sqlx-core/src/postgres/io/buf_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl PgBufMutExt for Vec<u8> {
// N.B. if you change this don't forget to update it in ../describe.rs
self.extend(b"sqlx_s_");

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

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

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

self.push(0);
Expand Down