diff --git a/Cargo.toml b/Cargo.toml index 760e09d4..fe2b7caa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ authors = ["Samuel Tardieu "] categories = ["algorithms"] readme = "README.md" edition = "2024" -rust-version = "1.85.0" +rust-version = "1.86.0" [package.metadata.release] sign-commit = true diff --git a/src/directed/astar.rs b/src/directed/astar.rs index 5e0dfbcd..01adcfdb 100644 --- a/src/directed/astar.rs +++ b/src/directed/astar.rs @@ -364,9 +364,7 @@ impl AstarSolution { } 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() {} self.current.last_mut().map(Vec::pop); } diff --git a/src/lib.rs b/src/lib.rs index e1dfc7fd..9888972f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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