Skip to content
This repository was archived by the owner on Mar 30, 2026. It is now read-only.
This repository was archived by the owner on Mar 30, 2026. It is now read-only.

Improve lifetime of string reference returned by DepTriple::relation #17

Description

@danieldk

The lifetime of the string reference returned by DepTriple::relation is bound to DepTriple. This is ok when DepTriple owns a String. However, if the string is borrowed, a more appropriate lifetime would be the actual lifetime of the string reference.

This makes the life easier for users of DepTriple, because now something like depgraph.head(idx).unwrap().relation() will complain that the relation outlives the triple.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions