Skip to content
Open
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.10.0 (2025-07-28)

* Backwards compatible edit to transitive_reduce (allow iter arg)

## 0.9.0 (2025-04-18)

* Update `petgraph` to `0.8` ([#43][#43]).
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "daggy"
version = "0.9.0"
version = "0.10.0"
authors = ["mitchmindtree <mitchell.nordine@gmail.com>"]
description = "A directed acyclic graph data structure library. It is Implemented on top of petgraph's Graph data structure and attempts to follow similar conventions where suitable."
readme = "README.md"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Use daggy in your project by adding it to your `Cargo.toml` dependencies:

```toml
[dependencies]
daggy = "0.9.0"
daggy = "0.10.0"

# Enables the `StableDag` type.
daggy = { version = "0.9.0", features = ["stable_dag"] }
daggy = { version = "0.10.0", features = ["stable_dag"] }

# Allows the `Dag` to be serialized and deserialized.
daggy = { version = "0.9.0", features = ["serde-1"] }
daggy = { version = "0.10.0", features = ["serde-1"] }
```

## Examples
Expand Down
11 changes: 7 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
//!
//! ```toml
//! [dependencies]
//! daggy = "0.9.0"
//! daggy = "0.10.0"
//!
//! # Enables the `StableDag` type.
//! daggy = { version = "0.9.0", features = ["stable_dag"] }
//! daggy = { version = "0.10.0", features = ["stable_dag"] }
//!
//! # Allows the `Dag` to be serialized and deserialized.
//! daggy = { version = "0.9.0", features = ["serde-1"] }
//! daggy = { version = "0.10.0", features = ["serde-1"] }
//! ```
//!
//! # Examples
Expand Down Expand Up @@ -783,7 +783,10 @@ where
}

/// Mutates the DAG into its [transitive reduction](https://en.wikipedia.org/wiki/Directed_acyclic_graph#Transitive_closure_and_transitive_reduction)
pub fn transitive_reduce(&mut self, roots: Vec<NodeIndex<Ix>>) {
pub fn transitive_reduce<I>(&mut self, roots: I)
where
I: IntoIterator<Item = NodeIndex<Ix>>,
{
for root in roots {
self.transitive_reduce_iter(root, &mut Vec::new())
}
Expand Down