You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

writeable

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

writeable - cargo Package Compare versions

Comparing version
0.6.0
to
0.6.1
+1
-1
.cargo_vcs_info.json
{
"git": {
"sha1": "6bd4893cc44c2ca2718de47a119a31cc40045fe5"
"sha1": "e9ab7308efb2fdc0fca96f71106c68f9f5840056"
},
"path_in_vcs": "utils/writeable"
}

@@ -28,3 +28,2 @@ // This file is part of ICU4X. For terms of use, please see the file

/// A sample type implementing Display
#[cfg(feature = "bench")]
struct DisplayMessage<'s> {

@@ -34,3 +33,2 @@ message: &'s str,

#[cfg(feature = "bench")]
impl fmt::Display for DisplayMessage<'_> {

@@ -43,3 +41,2 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

/// A sample type that contains multiple fields
#[cfg(feature = "bench")]
struct ComplexWriteable<'a> {

@@ -53,3 +50,2 @@ prefix: &'a str,

#[cfg(feature = "bench")]
impl Writeable for ComplexWriteable<'_> {

@@ -74,3 +70,2 @@ fn write_to<W: fmt::Write + ?Sized>(&self, sink: &mut W) -> fmt::Result {

#[cfg(feature = "bench")]
writeable::impl_display_with_writeable!(ComplexWriteable<'_>);

@@ -81,3 +76,2 @@

const LONG_STR: &str = "this string is very very very very very very very very very very very very very very very very very very very very very very very very long";
#[cfg(feature = "bench")]
const LONG_OVERLAP_STR: &str =

@@ -105,3 +99,2 @@ "this string is very very very very very very very long but different";

#[cfg(feature = "bench")]
{

@@ -115,3 +108,2 @@ writeable_benches(c);

#[cfg(feature = "bench")]
fn writeable_benches(c: &mut Criterion) {

@@ -161,3 +153,2 @@ c.bench_function("writeable/to_string/short", |b| {

#[cfg(feature = "bench")]
fn writeable_dyn_benches(c: &mut Criterion) {

@@ -195,3 +186,2 @@ // Same as `write_to_string`, but casts to a `dyn fmt::Write`

#[cfg(feature = "bench")]
fn display_benches(c: &mut Criterion) {

@@ -224,3 +214,2 @@ c.bench_function("display/to_string/short", |b| {

#[cfg(feature = "bench")]
fn complex_benches(c: &mut Criterion) {

@@ -227,0 +216,0 @@ const COMPLEX_WRITEABLE_MEDIUM: ComplexWriteable = ComplexWriteable {

@@ -34,5 +34,5 @@ # This file is automatically @generated by Cargo.

name = "bumpalo"
version = "3.15.0"
version = "3.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f"
checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"

@@ -86,5 +86,5 @@ [[package]]

name = "clap"
version = "4.4.0"
version = "4.5.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d5f1946157a96594eb2d2c10eb7ad9a2b27518cb3000209dec700c35df9197d"
checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767"
dependencies = [

@@ -96,5 +96,5 @@ "clap_builder",

name = "clap_builder"
version = "4.4.0"
version = "4.5.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78116e32a042dd73c2901f0dc30790d20ff3447f3e3472fad359e8c3d282bcd6"
checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863"
dependencies = [

@@ -107,5 +107,5 @@ "anstyle",

name = "clap_lex"
version = "0.5.1"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961"
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"

@@ -150,5 +150,5 @@ [[package]]

name = "crossbeam-deque"
version = "0.8.5"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
dependencies = [

@@ -170,17 +170,17 @@ "crossbeam-epoch",

name = "crossbeam-utils"
version = "0.8.20"
version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crunchy"
version = "0.2.2"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
[[package]]
name = "either"
version = "1.13.0"
version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d"

@@ -216,9 +216,9 @@ [[package]]

name = "is-terminal"
version = "0.4.13"
version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b"
checksum = "e19b23d53f35ce9f56aebc7d1bb4e6ac1e9c0db7ac85c8d1760c04379edced37"
dependencies = [
"hermit-abi",
"libc",
"windows-sys 0.52.0",
"windows-sys",
]

@@ -237,12 +237,13 @@

name = "itoa"
version = "1.0.13"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2"
checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
[[package]]
name = "js-sys"
version = "0.3.72"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9"
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
dependencies = [
"once_cell",
"wasm-bindgen",

@@ -253,11 +254,11 @@ ]

name = "libc"
version = "0.2.164"
version = "0.2.170"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f"
checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828"
[[package]]
name = "log"
version = "0.4.22"
version = "0.4.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"

@@ -281,5 +282,5 @@ [[package]]

name = "once_cell"
version = "1.20.2"
version = "1.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"

@@ -331,5 +332,5 @@ [[package]]

name = "proc-macro2"
version = "1.0.92"
version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
dependencies = [

@@ -341,5 +342,5 @@ "unicode-ident",

name = "quote"
version = "1.0.37"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [

@@ -429,6 +430,12 @@ "proc-macro2",

[[package]]
name = "rustversion"
version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
[[package]]
name = "ryu"
version = "1.0.18"
version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd"

@@ -446,5 +453,5 @@ [[package]]

name = "serde"
version = "1.0.215"
version = "1.0.218"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60"
dependencies = [

@@ -456,5 +463,5 @@ "serde_derive",

name = "serde_derive"
version = "1.0.215"
version = "1.0.218"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b"
dependencies = [

@@ -468,5 +475,5 @@ "proc-macro2",

name = "serde_json"
version = "1.0.133"
version = "1.0.139"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6"
dependencies = [

@@ -481,5 +488,5 @@ "itoa",

name = "syn"
version = "2.0.89"
version = "2.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e"
checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
dependencies = [

@@ -503,5 +510,5 @@ "proc-macro2",

name = "unicode-ident"
version = "1.0.14"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe"

@@ -526,8 +533,9 @@ [[package]]

name = "wasm-bindgen"
version = "0.2.95"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",

@@ -538,9 +546,8 @@ ]

name = "wasm-bindgen-backend"
version = "0.2.95"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",

@@ -554,5 +561,5 @@ "quote",

name = "wasm-bindgen-macro"
version = "0.2.95"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
dependencies = [

@@ -565,5 +572,5 @@ "quote",

name = "wasm-bindgen-macro-support"
version = "0.2.95"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [

@@ -579,11 +586,14 @@ "proc-macro2",

name = "wasm-bindgen-shared"
version = "0.2.95"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
dependencies = [
"unicode-ident",
]
[[package]]
name = "web-sys"
version = "0.3.72"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112"
checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
dependencies = [

@@ -600,3 +610,3 @@ "js-sys",

dependencies = [
"windows-sys 0.59.0",
"windows-sys",
]

@@ -606,11 +616,2 @@

name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-sys"
version = "0.59.0"

@@ -689,3 +690,3 @@ source = "registry+https://github.com/rust-lang/crates.io-index"

name = "writeable"
version = "0.6.0"
version = "0.6.1"
dependencies = [

@@ -692,0 +693,0 @@ "criterion",

@@ -14,5 +14,5 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO

edition = "2021"
rust-version = "1.71.1"
rust-version = "1.81"
name = "writeable"
version = "0.6.0"
version = "0.6.1"
authors = ["The ICU4X Project Developers"]

@@ -30,2 +30,3 @@ build = false

]
autolib = false
autobins = false

@@ -40,5 +41,2 @@ autoexamples = false

[package.metadata.cargo-all-features]
denylist = ["bench"]
[package.metadata.docs.rs]

@@ -50,2 +48,5 @@ all-features = true

[features]
either = ["dep:either"]
[lib]

@@ -78,7 +79,3 @@ name = "writeable"

[features]
bench = []
either = ["dep:either"]
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.criterion]
version = "0.5.0"

@@ -21,4 +21,6 @@ // This file is part of ICU4X. For terms of use, please see the file

}
let cmp_len = core::cmp::min(other.len(), self.code_units.len());
let (this, remainder) = self.code_units.split_at(cmp_len);
let (this, remainder) = self
.code_units
.split_at_checked(other.len())
.unwrap_or((self.code_units, &[]));
self.code_units = remainder;

@@ -25,0 +27,0 @@ self.result = this.cmp(other.as_bytes());

@@ -6,3 +6,3 @@ // This file is part of ICU4X. For terms of use, please see the file

// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(all(not(test), not(doc)), no_std)]
#![cfg_attr(not(any(test, doc)), no_std)]
#![cfg_attr(

@@ -17,2 +17,3 @@ not(test),

clippy::exhaustive_enums,
clippy::trivially_copy_pass_by_ref,
missing_debug_implementations,

@@ -232,6 +233,7 @@ )

/// A sink that supports annotating parts of the string with `Part`s.
/// A sink that supports annotating parts of the string with [`Part`]s.
pub trait PartsWrite: fmt::Write {
type SubPartsWrite: PartsWrite + ?Sized;
/// Annotates all strings written by the closure with the given [`Part`].
fn with_part(

@@ -238,0 +240,0 @@ &mut self,

Sorry, the diff of this file is not supported yet