Skip to content

Commit cc4f770

Browse files
Auto merge of #147918 - yotamofek:pr/stringdex-fork, r=<try>
[PERF] see if my fork of `stringdex` affects perf
2 parents c7a635f + cc972ec commit cc4f770

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

Cargo.lock

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5264,8 +5264,7 @@ dependencies = [
52645264
[[package]]
52655265
name = "stringdex"
52665266
version = "0.0.2"
5267-
source = "registry+https://github.com/rust-lang/crates.io-index"
5268-
checksum = "18b3bd4f10d15ef859c40291769f0d85209de6b0f1c30713ff9cdf45ac43ea36"
5267+
source = "git+https://gitlab.com/yotamofek/stringdex?rev=b839d6322b51c02307a1a5e16045b2c1c3b7d4af#b839d6322b51c02307a1a5e16045b2c1c3b7d4af"
52695268
dependencies = [
52705269
"stacker",
52715270
]

src/librustdoc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ rustdoc-json-types = { path = "../rustdoc-json-types" }
2121
serde = { version = "1.0", features = ["derive"] }
2222
serde_json = "1.0"
2323
smallvec = "1.8.1"
24-
stringdex = "=0.0.2"
24+
stringdex = { git = "https://gitlab.com/yotamofek/stringdex", rev = "b839d6322b51c02307a1a5e16045b2c1c3b7d4af" }
2525
tempfile = "3"
2626
threadpool = "1.8.1"
2727
tracing = "0.1"

src/librustdoc/html/render/search_index.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::collections::hash_map::Entry;
66
use std::path::Path;
77

88
use ::serde::de::{self, Deserializer, Error as _};
9-
use ::serde::ser::{SerializeSeq, Serializer};
9+
use ::serde::ser::{Error as _, SerializeSeq, Serializer};
1010
use ::serde::{Deserialize, Serialize};
1111
use rustc_ast::join_path_syms;
1212
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
@@ -1059,12 +1059,14 @@ impl Serialize for TypeData {
10591059
let mut buf = Vec::new();
10601060
encode::write_postings_to_string(&self.inverted_function_inputs_index, &mut buf);
10611061
let mut serialized_result = Vec::new();
1062-
stringdex_internals::encode::write_base64_to_bytes(&buf, &mut serialized_result);
1062+
stringdex_internals::encode::write_base64_to_bytes(&buf, &mut serialized_result)
1063+
.map_err(S::Error::custom)?;
10631064
seq.serialize_element(&str::from_utf8(&serialized_result).unwrap())?;
10641065
buf.clear();
10651066
serialized_result.clear();
10661067
encode::write_postings_to_string(&self.inverted_function_output_index, &mut buf);
1067-
stringdex_internals::encode::write_base64_to_bytes(&buf, &mut serialized_result);
1068+
stringdex_internals::encode::write_base64_to_bytes(&buf, &mut serialized_result)
1069+
.map_err(S::Error::custom)?;
10681070
seq.serialize_element(&str::from_utf8(&serialized_result).unwrap())?;
10691071
if self.search_unbox {
10701072
seq.serialize_element(&1)?;

src/tools/tidy/src/extdeps.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const ALLOWED_SOURCES: &[&str] = &[
1111
r#""registry+https://github.com/rust-lang/crates.io-index""#,
1212
// This is `rust_team_data` used by `site` in src/tools/rustc-perf,
1313
r#""git+https://github.com/rust-lang/team#a5260e76d3aa894c64c56e6ddc8545b9a98043ec""#,
14+
// TMP:
15+
r#""git+https://gitlab.com/yotamofek/stringdex?rev=b839d6322b51c02307a1a5e16045b2c1c3b7d4af#b839d6322b51c02307a1a5e16045b2c1c3b7d4af""#,
1416
];
1517

1618
/// Checks for external package sources. `root` is the path to the directory that contains the

0 commit comments

Comments
 (0)