-
Notifications
You must be signed in to change notification settings - Fork 13.3k
graphviz: support style attributes #27044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
} | ||
|
||
impl LabelledGraph { | ||
fn new(name: &'static str, | ||
node_labels: Trivial, | ||
edges: Vec<Edge>) -> LabelledGraph { | ||
edges: Vec<Edge>, | ||
node_styles: Vec<Style>) -> LabelledGraph { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you make the node_styles
an Option<Vec<Style>>
instead? In your tests, it seemed annoying to construct the vecs of no-style so frequently.
@nrc looks fine. I trust you to make your own call regarding my suggestion about the API change. r=me after that is or is not addressed. :) |
So I ended up making the ctor take an Option rather than changing the field. I think that gives us the best of both worlds. |
📌 Commit 75f8f96 has been approved by |
oh great, changing the ctor was actually what I was intending. :) |
r? @pnkfelix