Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upmaking uuid field on OpaqueOrigin public #159
Conversation
|
The point is that you can only compare these for equality and change them. Exposing the internal representation is explicitly not something we want to allow. |
|
@Ms2ger hmm, I was confused, now I'm more confused. If this value is private, what will print out in servo when you call I assumed it would be the value of the uuid in the OpaqueOrigin but it seems that's not totally obvious. I'm working on adding origin to servo's location and url APIs. I guess I can just have it return "protocol://" like in chrome? Chrome:
|
|
https://html.spec.whatwg.org/multipage/browsers.html#unicode-serialisation-of-an-origin
|
|
@jdm has an open PR that works on the origin issue: servo/servo#8658 |
Chandler commentedJan 18, 2016
by default, fields on tuple structs are private[1]. In this case, an instance of OpaqueOrigin is not very useful if the only field is private and there's no getter.
[1] https://github.com/rust-lang/rfcs/blob/master/text/0001-private-fields.md