From 67c10dc4e105b9c6ea661260a712eb1cabbe4b59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Aug 2024 04:28:28 +0000 Subject: [PATCH 1/4] chore(deps): bump idna from 0.5.0 to 1.0.2 Bumps [idna](https://github.com/servo/rust-url) from 0.5.0 to 1.0.2. - [Release notes](https://github.com/servo/rust-url/releases) - [Commits](https://github.com/servo/rust-url/compare/v0.5.0...idna-v1.0.2) --- updated-dependencies: - dependency-name: idna dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> --- Cargo.lock | 267 ++++++++++++++++++++++++++++++++++++++++++++++++++++- Cargo.toml | 2 +- 2 files changed, 267 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bdde202b9..ec8d73da2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -921,6 +921,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.46", +] + [[package]] name = "dns-lookup" version = "2.0.4" @@ -1295,6 +1306,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.46", +] + [[package]] name = "idna" version = "0.3.0" @@ -1315,6 +1444,18 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "idna" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd69211b9b519e98303c015e21a007e293db403b6c85b9b124e133d25e242cdd" +dependencies = [ + "icu_normalizer", + "icu_properties", + "smallvec", + "utf8_iter", +] + [[package]] name = "indexmap" version = "1.9.3" @@ -1521,6 +1662,12 @@ version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.10" @@ -2924,6 +3071,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "string_cache" version = "0.8.7" @@ -2992,6 +3145,17 @@ dependencies = [ "syn 2.0.46", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.46", +] + [[package]] name = "syslog_loose" version = "0.21.0" @@ -3125,6 +3289,16 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -3406,12 +3580,24 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + [[package]] name = "utf8-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.1" @@ -3480,7 +3666,7 @@ dependencies = [ "hmac", "hostname", "iana-time-zone", - "idna 0.5.0", + "idna 1.0.2", "indexmap 2.4.0", "indoc", "influxdb-line-protocol", @@ -3975,6 +4161,18 @@ dependencies = [ "regex", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -3993,12 +4191,79 @@ dependencies = [ "home", ] +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.46", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.46", + "synstructure", +] + [[package]] name = "zeroize" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.46", +] + [[package]] name = "zstd" version = "0.13.2" diff --git a/Cargo.toml b/Cargo.toml index 97464c201..c479fa296 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -140,7 +140,7 @@ flate2 = { version = "1", default-features = false, features = ["default"], opti hex = { version = "0.4", optional = true } hmac = { version = "0.12", optional = true } iana-time-zone = { version = "0.1", optional = true } -idna = { version = "0.5", optional = true } +idna = { version = "1.0", optional = true } indexmap = { version = "~2.4.0", default-features = false, features = ["std"], optional = true} influxdb-line-protocol = { version = "2.0.0", optional = true } indoc = {version = "2", optional = true } From 38869e94daf552e592c01bf0bdef0dede51e0008 Mon Sep 17 00:00:00 2001 From: Jesse Szwedko <jesse.szwedko@datadoghq.com> Date: Fri, 23 Aug 2024 10:29:40 -0700 Subject: [PATCH 2/4] regenerate licenses Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com> --- LICENSE-3rdparty.csv | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/LICENSE-3rdparty.csv b/LICENSE-3rdparty.csv index e89612d23..985ec207d 100644 --- a/LICENSE-3rdparty.csv +++ b/LICENSE-3rdparty.csv @@ -71,6 +71,7 @@ derive_more,https://github.com/JelteF/derive_more,MIT,Jelte Fennema <github-tech digest,https://github.com/RustCrypto/traits,MIT OR Apache-2.0,RustCrypto Developers dirs-next,https://github.com/xdg-rs/dirs,MIT OR Apache-2.0,The @xdg-rs members dirs-sys-next,https://github.com/xdg-rs/dirs/tree/master/dirs-sys,MIT OR Apache-2.0,The @xdg-rs members +displaydoc,https://github.com/yaahc/displaydoc,MIT OR Apache-2.0,Jane Lusby <jlusby@yaah.dev> dns-lookup,https://github.com/keeperofdakeys/dns-lookup,MIT OR Apache-2.0,Josh Driver <keeperofdakeys@gmail.com> doc-comment,https://github.com/GuillaumeGomez/doc-comment,MIT,Guillaume Gomez <guillaume1.gomez@gmail.com> domain,https://github.com/nlnetlabs/domain,BSD-3-Clause,NLnet Labs <dns-team@nlnetlabs.nl> @@ -105,6 +106,16 @@ home,https://github.com/rust-lang/cargo,MIT OR Apache-2.0,Brian Anderson <anders hostname,https://github.com/svartalf/hostname,MIT,"fengcen <fengcen.love@gmail.com>, svartalf <self@svartalf.info>" iana-time-zone,https://github.com/strawlab/iana-time-zone,MIT OR Apache-2.0,"Andrew Straw <strawman@astraw.com>, René Kijewski <rene.kijewski@fu-berlin.de>, Ryan Lopopolo <rjl@hyperbo.la>" iana-time-zone-haiku,https://github.com/strawlab/iana-time-zone,MIT OR Apache-2.0,René Kijewski <crates.io@k6i.de> +icu_collections,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers +icu_locid,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers +icu_locid_transform,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers +icu_locid_transform_data,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers +icu_normalizer,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers +icu_normalizer_data,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers +icu_properties,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers +icu_properties_data,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers +icu_provider,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers +icu_provider_macros,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers indexmap,https://github.com/indexmap-rs/indexmap,Apache-2.0 OR MIT,The indexmap Authors indoc,https://github.com/dtolnay/indoc,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com> influxdb-line-protocol,https://github.com/influxdata/influxdb_iox/tree/main/influxdb_line_protocol,MIT OR Apache-2.0,InfluxDB IOx Project Developers @@ -122,6 +133,7 @@ lazy_static,https://github.com/rust-lang-nursery/lazy-static.rs,MIT OR Apache-2. libc,https://github.com/rust-lang/libc,MIT OR Apache-2.0,The Rust Project Developers libm,https://github.com/rust-lang/libm,MIT OR Apache-2.0,Jorge Aparicio <jorge@japaric.io> linux-raw-sys,https://github.com/sunfishcode/linux-raw-sys,Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT,Dan Gohman <dev@sunfishcode.online> +litemap,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers log,https://github.com/rust-lang/log,MIT OR Apache-2.0,The Rust Project Developers md-5,https://github.com/RustCrypto/hashes,MIT OR Apache-2.0,RustCrypto Developers memchr,https://github.com/BurntSushi/memchr,Unlicense OR MIT,"Andrew Gallant <jamslam@gmail.com>, bluss" @@ -211,11 +223,13 @@ smallvec,https://github.com/servo/rust-smallvec,MIT OR Apache-2.0,The Servo Proj snafu,https://github.com/shepmaster/snafu,MIT OR Apache-2.0,Jake Goulding <jake.goulding@gmail.com> snap,https://github.com/BurntSushi/rust-snappy,BSD-3-Clause,Andrew Gallant <jamslam@gmail.com> socket2,https://github.com/rust-lang/socket2,MIT OR Apache-2.0,"Alex Crichton <alex@alexcrichton.com>, Thomas de Zeeuw <thomasdezeeuw@gmail.com>" +stable_deref_trait,https://github.com/storyyeller/stable_deref_trait,MIT OR Apache-2.0,Robert Grosse <n210241048576@gmail.com> strip-ansi-escapes,https://github.com/luser/strip-ansi-escapes,Apache-2.0 OR MIT,Ted Mielczarek <ted@mielczarek.org> strsim,https://github.com/rapidfuzz/strsim-rs,MIT,"Danny Guo <danny@dannyguo.com>, maxbachmann <oss@maxbachmann.de>" subtle,https://github.com/dalek-cryptography/subtle,BSD-3-Clause,"Isis Lovecruft <isis@patternsinthevoid.net>, Henry de Valence <hdevalence@hdevalence.ca>" syn,https://github.com/dtolnay/syn,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com> syn_derive,https://github.com/Kyuuhachi/syn_derive,MIT OR Apache-2.0,Kyuuhachi <caagr98@gmail.com> +synstructure,https://github.com/mystor/synstructure,MIT,Nika Layzell <nika@thelayzells.com> syslog_loose,https://github.com/FungusHumungus/syslog-loose,MIT,Stephen Wakely <fungus.humungus@gmail.com> tagptr,https://github.com/oliver-giersch/tagptr,MIT OR Apache-2.0,Oliver Giersch tap,https://github.com/myrrlyn/tap,MIT,"Elliott Linder <elliott.darfink@gmail.com>, myrrlyn <self@myrrlyn.dev>" @@ -223,6 +237,7 @@ term,https://github.com/Stebalien/term,MIT OR Apache-2.0,"The Rust Project Devel termcolor,https://github.com/BurntSushi/termcolor,Unlicense OR MIT,Andrew Gallant <jamslam@gmail.com> thiserror,https://github.com/dtolnay/thiserror,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com> time,https://github.com/time-rs/time,MIT OR Apache-2.0,"Jacob Pratt <open-source@jhpratt.dev>, Time contributors" +tinystr,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers tinyvec,https://github.com/Lokathor/tinyvec,Zlib OR Apache-2.0 OR MIT,Lokathor <zefria@gmail.com> tinyvec_macros,https://github.com/Soveu/tinyvec_macros,MIT OR Apache-2.0 OR Zlib,Soveu <marx.tomasz@gmail.com> tokio,https://github.com/tokio-rs/tokio,MIT,Tokio Contributors <team@tokio.rs> @@ -243,7 +258,9 @@ unicode-width,https://github.com/unicode-rs/unicode-width,MIT OR Apache-2.0,"kwa universal-hash,https://github.com/RustCrypto/traits,MIT OR Apache-2.0,RustCrypto Developers unsafe-libyaml,https://github.com/dtolnay/unsafe-libyaml,MIT,David Tolnay <dtolnay@gmail.com> url,https://github.com/servo/rust-url,MIT OR Apache-2.0,The rust-url developers +utf16_iter,https://github.com/hsivonen/utf16_iter,Apache-2.0 OR MIT,Henri Sivonen <hsivonen@hsivonen.fi> utf8-width,https://github.com/magiclen/utf8-width,MIT,Magic Len <len@magiclen.org> +utf8_iter,https://github.com/hsivonen/utf8_iter,Apache-2.0 OR MIT,Henri Sivonen <hsivonen@hsivonen.fi> uuid,https://github.com/uuid-rs/uuid,Apache-2.0 OR MIT,"Ashley Mannix<ashleymannix@live.com.au>, Dylan DPC<dylan.dpc@gmail.com>, Hunar Roop Kahlon<hunar.roop@gmail.com>" valuable,https://github.com/tokio-rs/valuable,MIT,The valuable Authors vte,https://github.com/alacritty/vte,Apache-2.0 OR MIT,"Joe Wilm <joe@jwilm.com>, Christian Duerr <contact@christianduerr.com>" @@ -261,8 +278,16 @@ winapi-util,https://github.com/BurntSushi/winapi-util,Unlicense OR MIT,Andrew Ga windows,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Microsoft winnow,https://github.com/winnow-rs/winnow,MIT,The winnow Authors woothee,https://github.com/woothee/woothee-rust,Apache-2.0,hhatto <hhatto.jp@gmail.com> +write16,https://github.com/hsivonen/write16,Apache-2.0 OR MIT,The write16 Authors +writeable,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers wyz,https://github.com/myrrlyn/wyz,MIT,myrrlyn <self@myrrlyn.dev> +yoke,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <manishsmail@gmail.com> +yoke-derive,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <manishsmail@gmail.com> +zerofrom,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <manishsmail@gmail.com> +zerofrom-derive,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <manishsmail@gmail.com> zeroize,https://github.com/RustCrypto/utils/tree/master/zeroize,Apache-2.0 OR MIT,The RustCrypto Project Developers +zerovec,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers +zerovec-derive,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <manishsmail@gmail.com> zstd,https://github.com/gyscos/zstd-rs,MIT,Alexandre Bury <alexandre.bury@gmail.com> zstd-safe,https://github.com/gyscos/zstd-rs,MIT OR Apache-2.0,Alexandre Bury <alexandre.bury@gmail.com> zstd-sys,https://github.com/gyscos/zstd-rs,MIT OR Apache-2.0,Alexandre Bury <alexandre.bury@gmail.com> From 6715c4b4a3b395e5be5d020cd3770e5bb6801cb3 Mon Sep 17 00:00:00 2001 From: Jesse Szwedko <jesse.szwedko@datadoghq.com> Date: Tue, 12 Nov 2024 08:13:11 -0500 Subject: [PATCH 3/4] Fix tests Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com> --- src/stdlib/decode_punycode.rs | 6 +++--- src/stdlib/encode_punycode.rs | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/stdlib/decode_punycode.rs b/src/stdlib/decode_punycode.rs index 4c2ea1584..b44f53bdd 100644 --- a/src/stdlib/decode_punycode.rs +++ b/src/stdlib/decode_punycode.rs @@ -80,7 +80,7 @@ impl FunctionExpression for DecodePunycodeFn { if validate { let (decoded, result) = idna::domain_to_unicode(&string); - result.map_err(|errors| format!("unable to decode punycode: {errors}"))?; + result.map_err(|_errors| format!("unable to decode punycode"))?; Ok(decoded.into()) } else { let decoded = string @@ -125,13 +125,13 @@ mod test { bidi_error { args: func_args![value: value!("xn--8hbb.xn--fiba.xn--8hbf.xn--eib.")], - want: Err("unable to decode punycode: Errors { check_bidi }"), + want: Err("unable to decode punycode"), tdef: TypeDef::bytes().fallible(), } multiple_errors { args: func_args![value: value!("dns1.webproxy.idc.csesvcgateway.xn--line-svcgateway-jp-mvm-ri-d060072.\\-1roslin.canva.cn.")], - want: Err("unable to decode punycode: Errors { punycode, check_bidi }"), + want: Err("unable to decode punycode"), tdef: TypeDef::bytes().fallible(), } diff --git a/src/stdlib/encode_punycode.rs b/src/stdlib/encode_punycode.rs index ebaae41ec..d5cadc9b7 100644 --- a/src/stdlib/encode_punycode.rs +++ b/src/stdlib/encode_punycode.rs @@ -80,7 +80,7 @@ impl FunctionExpression for EncodePunycodeFn { if validate { let encoded = idna::domain_to_ascii(&string) - .map_err(|errors| format!("unable to encode to punycode: {errors}"))?; + .map_err(|_errors| format!("unable to encode to punycode"))?; Ok(encoded.into()) } else { if string @@ -155,19 +155,19 @@ mod test { bidi_error { args: func_args![value: value!("xn--8hbb.xn--fiba.xn--8hbf.xn--eib.")], - want: Err("unable to encode to punycode: Errors { check_bidi }"), + want: Err("unable to encode to punycode"), tdef: TypeDef::bytes().fallible(), } multiple_errors { args: func_args![value: value!("dns1.webproxy.idc.csesvcgateway.xn--line-svcgateway-jp-mvm-ri-d060072.\\-1roslin.canva.cn.")], - want: Err("unable to encode to punycode: Errors { punycode, check_bidi }"), + want: Err("unable to encode to punycode"), tdef: TypeDef::bytes().fallible(), } bidi_error2 { args: func_args![value: value!("wwes.ir.abadgostaran.ir.taakads.ir.farhadrahimy.ir.regk.ir.2qok.com.خرید-پستی.com.maskancto.com.phpars.com.eshelstore.ir.techtextile.ir.mrafiei.ir.hamtamotor.com.surfiran.ir.negar3d.com.tjketab.ir.3d4dl.ir.cabindooshsahand.com.mashtikebab.sbs.")], - want: Err("unable to encode to punycode: Errors { check_bidi }"), + want: Err("unable to encode to punycode"), tdef: TypeDef::bytes().fallible(), } From 96b20406106af7719d07c958744aa45242a08d7e Mon Sep 17 00:00:00 2001 From: Jesse Szwedko <jesse.szwedko@datadoghq.com> Date: Tue, 12 Nov 2024 13:09:37 -0500 Subject: [PATCH 4/4] clippy Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com> --- src/stdlib/decode_punycode.rs | 2 +- src/stdlib/encode_punycode.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stdlib/decode_punycode.rs b/src/stdlib/decode_punycode.rs index b44f53bdd..d8c2eb71c 100644 --- a/src/stdlib/decode_punycode.rs +++ b/src/stdlib/decode_punycode.rs @@ -80,7 +80,7 @@ impl FunctionExpression for DecodePunycodeFn { if validate { let (decoded, result) = idna::domain_to_unicode(&string); - result.map_err(|_errors| format!("unable to decode punycode"))?; + result.map_err(|_errors| "unable to decode punycode".to_string())?; Ok(decoded.into()) } else { let decoded = string diff --git a/src/stdlib/encode_punycode.rs b/src/stdlib/encode_punycode.rs index d5cadc9b7..9cd68affb 100644 --- a/src/stdlib/encode_punycode.rs +++ b/src/stdlib/encode_punycode.rs @@ -80,7 +80,7 @@ impl FunctionExpression for EncodePunycodeFn { if validate { let encoded = idna::domain_to_ascii(&string) - .map_err(|_errors| format!("unable to encode to punycode"))?; + .map_err(|_errors| "unable to encode to punycode".to_string())?; Ok(encoded.into()) } else { if string