Skip to content

Commit

Permalink
v0.2.2
Browse files Browse the repository at this point in the history
* Fixed a deadlock.
  • Loading branch information
raldone01 committed Jan 2, 2025
1 parent 314cb01 commit e8572b8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2.2] - 2025-01-02

* Fixed a deadlock.

## [0.2.1] - 2025-01-01

* Fixed a bug where rust analyser would resolve the crate paths incorrectly due to caching of `'static` lifetimes.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ strip = "debuginfo"

[package]
name = "cargo-manifest-proc-macros"
version = "0.2.1"
version = "0.2.2"
edition = "2024"
license = "MIT OR Apache-2.0"
description = "Find the syn::Path to your own crate from proc-macros reliably."
Expand Down
5 changes: 2 additions & 3 deletions src/cargo_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl CargoManifest {
// Get the cached shared instance of the CargoManifest.
let existing_shared_instance =
manifests
.get_mut(&current_cargo_manifest_path)
.get(&current_cargo_manifest_path)
.map(|cargo_manifest_mutex| {
let mut shared_instance = cargo_manifest_mutex.lock().unwrap();
// We do this to avoid leaking a new CargoManifest instance, when a Cargo.toml we had already parsed previously is changed.
Expand All @@ -179,8 +179,7 @@ impl CargoManifest {
*shared_instance = cargo_manifest;
}

let guard = cargo_manifest_mutex.lock().unwrap();
guard
shared_instance
});

let shared_instance = existing_shared_instance.unwrap_or_else(move || {
Expand Down
2 changes: 1 addition & 1 deletion tests/workspace_deps/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e8572b8

Please sign in to comment.