Closed sepcnt closed 4 months ago
I think the "servo" feature (or the "serde" feature) of stylo needs to enable the "serde" feature of the "url" crate. This probably doesn't affect servo because it is already enabling that feature itself.
Also webrender_api
may not in malloc_size_of/servo
feature set but malloc_size_of/webrender_api
#[cfg(feature = "webrender_api")]
extern crate webrender_api;
This issue is fixed by #9.
Description:
While working with Stylo, I encountered a trait bound error. The error message indicates that the trait
serde::Serialize
is not implemented forUrl
, which is required byservo_arc::Arc<Url>: serde::Serialize
.Error Details:
The error occurs in the file
~\.cargo\git\checkouts\stylo-d5871ad1ba1940d3\e2a4834\style\servo\url.rs
at line 211. Here is the relevant code and error message:Expected Behavior:
The
Url
type should be serializable as it is used within anArc
in theValid
variant of an enum (or similar data structure).Actual Behavior:
The compiler throws a trait bound error because
Url
does not implementserde::Serialize
.