switch to petgraph 0.8.1 now that my PR was merged and released to crates.io
All checks were successful
/ deps (pull_request) Successful in 18s
/ test (pull_request) Successful in 4m25s

This commit is contained in:
Jacob Lifshay 2025-04-09 20:48:40 -07:00
parent e2d2d4110b
commit 91e1b619e8
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ
3 changed files with 20 additions and 14 deletions

21
Cargo.lock generated
View file

@ -298,7 +298,7 @@ dependencies = [
"eyre",
"fayalite-proc-macros",
"fayalite-visit-gen",
"hashbrown 0.15.2",
"hashbrown",
"jobslot",
"num-bigint",
"num-traits",
@ -392,12 +392,6 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "hashbrown"
version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
[[package]]
name = "hashbrown"
version = "0.15.2"
@ -432,12 +426,12 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
[[package]]
name = "indexmap"
version = "2.5.0"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5"
checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
dependencies = [
"equivalent",
"hashbrown 0.14.3",
"hashbrown",
"serde",
]
@ -525,11 +519,14 @@ dependencies = [
[[package]]
name = "petgraph"
version = "0.6.5"
source = "git+https://github.com/programmerjake/petgraph.git?rev=258ea8071209a924b73fe96f9f87a3b7b45cbc9f#258ea8071209a924b73fe96f9f87a3b7b45cbc9f"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a98c6720655620a521dcc722d0ad66cd8afd5d86e34a89ef691c50b7b24de06"
dependencies = [
"fixedbitset",
"hashbrown",
"indexmap",
"serde",
]
[[package]]

View file

@ -29,8 +29,7 @@ jobslot = "0.2.19"
num-bigint = "0.4.6"
num-traits = "0.2.16"
os_pipe = "1.2.1"
# TODO: switch back to crates.io once petgraph accepts PR #684 and releases a new version
petgraph = { git = "https://github.com/programmerjake/petgraph.git", rev = "258ea8071209a924b73fe96f9f87a3b7b45cbc9f" }
petgraph = "0.8.1"
prettyplease = "0.2.20"
proc-macro2 = "1.0.83"
quote = "1.0.36"

View file

@ -1022,6 +1022,16 @@ impl VisitMap<AssignmentOrSlotIndex> for AssignmentsVisitMap {
AssignmentOrSlotIndex::BigSlot(slot) => self.slots.contains(slot),
}
}
fn unvisit(&mut self, n: AssignmentOrSlotIndex) -> bool {
match n {
AssignmentOrSlotIndex::AssignmentIndex(assignment_index) => {
mem::replace(&mut self.assignments[assignment_index], false)
}
AssignmentOrSlotIndex::SmallSlot(slot) => self.slots.remove(slot),
AssignmentOrSlotIndex::BigSlot(slot) => self.slots.remove(slot),
}
}
}
impl Visitable for Assignments {