Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ authors = ["Samuel Tardieu <sam@rfc1149.net>"]
categories = ["algorithms"]
readme = "README.md"
edition = "2024"
rust-version = "1.85.0"
rust-version = "1.86.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify Rust 1.86.0 release status before merging.

The MSRV update looks correct and aligns with the PR objective. However, as mentioned in the PR description, this will fail until Rust 1.86.0 is officially released.

Please confirm the release status of Rust 1.86.0:


🌐 Web query:

Has Rust 1.86.0 been officially released? What is the current stable version of Rust?

💡 Result:

As of June 1, 2025, Rust 1.86.0 has not been officially released. The latest stable version is Rust 1.85.0, which was released on February 20, 2025. (blog.rust-lang.org) Rust 1.86.0 is currently in the beta phase and is scheduled to become stable on April 3, 2025. (releases.rs)

Citations:


Hold off MSRV bump until Rust 1.86.0 is officially stable

As of June 1, 2025, Rust 1.86.0 remains in beta and the latest stable release is 1.85.0 (Feb 20, 2025). Bumping rust-version to 1.86.0 will break builds when using the stable toolchain.

• File: Cargo.toml, line 14
• Suggested diff:

- rust-version = "1.86.0"
+ rust-version = "1.85.0"

Please revert this change or wait for the Rust 1.86.0 stable release before merging.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
rust-version = "1.86.0"
# Cargo.toml
rust-version = "1.85.0"
🤖 Prompt for AI Agents
In Cargo.toml at line 14, the rust-version is set to "1.86.0" which is not yet
officially released and will cause build failures. Revert the rust-version back
to the latest stable release "1.85.0" or wait until Rust 1.86.0 is officially
stable before updating this version.


[package.metadata.release]
sign-commit = true
Expand Down
4 changes: 1 addition & 3 deletions src/directed/astar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,7 @@ impl<N: Clone + Eq + Hash> AstarSolution<N> {
}

fn next_vec(&mut self) {
while self.current.last().map(Vec::len) == Some(1) {
self.current.pop();
}
while self.current.pop_if(|v| v.len() == 1).is_some() {}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify pop_if method availability and approve the refactoring.

The refactoring to use pop_if makes the code more concise and idiomatic. This change likely necessitates the MSRV bump to 1.86.0.

Please verify that the pop_if method is available in Rust 1.86.0:


🌐 Web query:

When was the Vec::pop_if method stabilized in Rust? Is it available in Rust 1.86.0?

💡 Result:

The Vec::pop_if method was stabilized in Rust 1.87.0, released on May 15, 2025. Therefore, it is not available in Rust 1.86.0. In Rust 1.86.0, the Vec::pop_if method was still marked as unstable. (doc.rust-lang.org)

Citations:


pop_if requires Rust 1.87.0—bump MSRV or revert to manual loop

The newly introduced Vec::pop_if wasn’t stabilized until Rust 1.87.0 (May 15, 2025). It’s still unstable in 1.86.0, so this change will break compilation under the current MSRV.

Locations to update:

  • src/directed/astar.rs: line 367
    while self.current.pop_if(|v| v.len() == 1).is_some() {}
    • Either bump your MSRV to ≥ 1.87.0 (update Cargo.toml, CI, documentation)
    • Or restore the previous manual loop (e.g., while matches!(self.current.last(), Some(v) if v.len() == 1) { self.current.pop(); })
🤖 Prompt for AI Agents
In src/directed/astar.rs at line 367, the use of Vec::pop_if requires Rust
1.87.0, but the current MSRV is 1.86.0 where pop_if is unstable. To fix this,
either update the MSRV to 1.87.0 or revert the code to the previous manual loop
approach that checks the last element's length and pops it if it equals 1.

self.current.last_mut().map(Vec::pop);
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
//! in this context, you can wrap them into compliant types using the
//! [ordered-float](https://crates.io/crates/ordered-float) crate.
//!
//! The minimum supported Rust version (MSRV) is Rust 1.85.0.
//! The minimum supported Rust version (MSRV) is Rust 1.86.0.
//!
//! [A*]: https://en.wikipedia.org/wiki/A*_search_algorithm
//! [BFS]: https://en.wikipedia.org/wiki/Breadth-first_search
Expand Down
Loading