Skip to content

Commit

Permalink
Remove FxHashMap -> HashMap logic now that it's unneeded.
Browse files Browse the repository at this point in the history
  • Loading branch information
aDotInTheVoid committed Apr 7, 2023
1 parent ed26026 commit 5f8bc87
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion COMMIT.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
52c71e6e2802a50d34ac4a3e96fc2636a3023eb2
12ad0d6686335e0ee830d85030f815905c2dac90
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
//! These types are the public API exposed through the `--output-format json` flag. The [`Crate`]
//! struct is the root of the JSON blob and all other items are contained within.

#![cfg_attr(feature = "rustc_hash", feature(rustc_private))]
#[cfg(feature = "rustc_hash")]
extern crate rustc_hash;
#[cfg(feature = "rustc_hash")]
use rustc_hash::FxHashMap as HashMap;
#[cfg(not(feature = "rustc_hash"))]
use std::collections::HashMap;

use serde::{Deserialize, Serialize};
use std::path::PathBuf;

Expand Down
6 changes: 3 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ pyjq() {
python3 -c "import json, sys; print(json.load(sys.stdin)${1})"
}

user="rust-lang"
user="aDotInTheVoid"
repo="rust"
branch="master"
branch="rdj-hashmap"

curl -# https://raw.githubusercontent.com/${user}/${repo}/${branch}/src/rustdoc-json-types/lib.rs | sed 's/rustc_hash::/std::collections::/g' | sed 's/FxHashMap/HashMap/g' > src/lib.rs
curl -# https://raw.githubusercontent.com/${user}/${repo}/${branch}/src/rustdoc-json-types/lib.rs > src/lib.rs

curl -# https://raw.githubusercontent.com/${user}/${repo}/${branch}/src/rustdoc-json-types/tests.rs > src/tests.rs

Expand Down

0 comments on commit 5f8bc87

Please sign in to comment.