Skip to content

Navigation Menu

Sign in
Sign up

Contour: Print no-op parts for alternate debug format - #473

Open
inferiorhumanorgans wants to merge 1 commit into
servo:main from
inferiorhumanorgans:iho/verbose-empty-contour
Open

Contour: Print no-op parts for alternate debug format #473
inferiorhumanorgans wants to merge 1 commit into
servo:main from
inferiorhumanorgans:iho/verbose-empty-contour

Conversation

@inferiorhumanorgans

@inferiorhumanorgans inferiorhumanorgans commented Jul 31, 2021

Copy link
Copy Markdown
Contributor

I'm working on a project where I'd like to print out the whole contour even if it's just a no-op (to maintain compatibility with an external project). It looks like there's already code in place to allow this conditionally, so what I propose is that the alternate debug implementation prints the whole string while the default debug maintains the current behavior.

Thoughts?

Given:

let mut path = Path2D::new();
path.move_to(Vector2F::new(1., 1.));
let path_string = path.into_outline();

Expect:

assert_eq!(format!("{:?}", path_string), " z");
// This would be new behavior
assert_eq!(format!("{:#?}", path_string), "M 1 1 L 1 1 z");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /