From 20431706a863f92cb37dc512fef6e48d192aaf2c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/itoa/.cargo-checksum.json | 2 +- vendor/itoa/Cargo.toml | 6 +++++- vendor/itoa/src/lib.rs | 8 +++++++- vendor/itoa/src/udiv128.rs | 5 +++++ 4 files changed, 18 insertions(+), 3 deletions(-) (limited to 'vendor/itoa') diff --git a/vendor/itoa/.cargo-checksum.json b/vendor/itoa/.cargo-checksum.json index 4af98bbb4..5c464a6c5 100644 --- a/vendor/itoa/.cargo-checksum.json +++ b/vendor/itoa/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"2e653183f335114876acd61d9e4eeb893b202e6842d4f128bbae40c121439432","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"4bc11375d5c1c2c7cf4988b94d44c0f1fe8cdf2d68755fef127cd5ba0d70b939","benches/bench.rs":"636f3093bd461210ad3063289d455f90669c4a1be3273bcd30898de39f02c641","src/lib.rs":"55c938bd2421bf2adc505504ecfe44dd8f537f234b3f3555bbaf6df87d35b54b","src/udiv128.rs":"16394f767854452756372d74f8025f7329fd8b61a676d81edf489681a6332ee9","tests/test.rs":"f7404fc5f7cd1bdaf74a3b64a70d5b30586241ddc1ce2c82bd1b564999fcce0e"},"package":"6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754"} \ No newline at end of file +{"files":{"Cargo.toml":"895c75445c305a4d56486a2ca7312a85a486469492286e277f41601be418bcd4","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"4bc11375d5c1c2c7cf4988b94d44c0f1fe8cdf2d68755fef127cd5ba0d70b939","benches/bench.rs":"636f3093bd461210ad3063289d455f90669c4a1be3273bcd30898de39f02c641","src/lib.rs":"9438cd2cfcf95e4a6719816580e209c3873beb75074ca756118f8723d336141b","src/udiv128.rs":"d28c1872c37ee2185931babcb20a221b8706a5aa8abc4963419763888023ff17","tests/test.rs":"f7404fc5f7cd1bdaf74a3b64a70d5b30586241ddc1ce2c82bd1b564999fcce0e"},"package":"4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"} \ No newline at end of file diff --git a/vendor/itoa/Cargo.toml b/vendor/itoa/Cargo.toml index c3a1bd601..bab03ecf7 100644 --- a/vendor/itoa/Cargo.toml +++ b/vendor/itoa/Cargo.toml @@ -13,7 +13,7 @@ edition = "2018" rust-version = "1.36" name = "itoa" -version = "1.0.3" +version = "1.0.4" authors = ["David Tolnay "] exclude = [ "performance.png", @@ -32,3 +32,7 @@ repository = "https://github.com/dtolnay/itoa" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] + +[dependencies.no-panic] +version = "0.1" +optional = true diff --git a/vendor/itoa/src/lib.rs b/vendor/itoa/src/lib.rs index 002156cb8..7c3616e51 100644 --- a/vendor/itoa/src/lib.rs +++ b/vendor/itoa/src/lib.rs @@ -30,7 +30,7 @@ //! //! ![performance](https://raw.githubusercontent.com/dtolnay/itoa/master/performance.png) -#![doc(html_root_url = "https://docs.rs/itoa/1.0.3")] +#![doc(html_root_url = "https://docs.rs/itoa/1.0.4")] #![no_std] #![allow( clippy::cast_lossless, @@ -43,6 +43,8 @@ mod udiv128; use core::mem::{self, MaybeUninit}; use core::{ptr, slice, str}; +#[cfg(feature = "no-panic")] +use no_panic::no_panic; /// A correctly sized stack allocation for the formatted integer to be written /// into. @@ -76,6 +78,7 @@ impl Buffer { /// This is a cheap operation; you don't need to worry about reusing buffers /// for efficiency. #[inline] + #[cfg_attr(feature = "no-panic", no_panic)] pub fn new() -> Buffer { let bytes = [MaybeUninit::::uninit(); I128_MAX_LEN]; Buffer { bytes } @@ -83,6 +86,7 @@ impl Buffer { /// Print an integer into this buffer and return a reference to its string /// representation within the buffer. + #[cfg_attr(feature = "no-panic", no_panic)] pub fn format(&mut self, i: I) -> &str { i.write(unsafe { &mut *(&mut self.bytes as *mut [MaybeUninit; I128_MAX_LEN] @@ -122,6 +126,7 @@ macro_rules! impl_Integer { #[allow(unused_comparisons)] #[inline] + #[cfg_attr(feature = "no-panic", no_panic)] fn write(self, buf: &mut [MaybeUninit; $max_len]) -> &str { let is_nonnegative = self >= 0; let mut n = if is_nonnegative { @@ -223,6 +228,7 @@ macro_rules! impl_Integer128 { #[allow(unused_comparisons)] #[inline] + #[cfg_attr(feature = "no-panic", no_panic)] fn write(self, buf: &mut [MaybeUninit; $max_len]) -> &str { let is_nonnegative = self >= 0; let n = if is_nonnegative { diff --git a/vendor/itoa/src/udiv128.rs b/vendor/itoa/src/udiv128.rs index df53eb526..0587047a7 100644 --- a/vendor/itoa/src/udiv128.rs +++ b/vendor/itoa/src/udiv128.rs @@ -1,5 +1,9 @@ +#[cfg(feature = "no-panic")] +use no_panic::no_panic; + /// Multiply unsigned 128 bit integers, return upper 128 bits of the result #[inline] +#[cfg_attr(feature = "no-panic", no_panic)] fn u128_mulhi(x: u128, y: u128) -> u128 { let x_lo = x as u64; let x_hi = (x >> 64) as u64; @@ -26,6 +30,7 @@ fn u128_mulhi(x: u128, y: u128) -> u128 { /// Implementation, 1994, pp. 61–72 /// #[inline] +#[cfg_attr(feature = "no-panic", no_panic)] pub fn udivmod_1e19(n: u128) -> (u128, u64) { let d = 10_000_000_000_000_000_000_u64; // 10^19 -- cgit v1.2.3