Răsfoiți Sursa

Auto merge of #370 - KiChjang:heapsizeof-parse-error, r=SimonSapin

Add HeapSizeOf impl for ParseError

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/370)
<!-- Reviewable:end -->
bors-servo 9 ani în urmă
părinte
comite
dd068e58ac
2 a modificat fișierele cu 4 adăugiri și 1 ștergeri
  1. 1 1
      Cargo.toml
  2. 3 0
      src/parser.rs

+ 1 - 1
Cargo.toml

@@ -2,7 +2,7 @@
 
 name = "url"
 # When updating version, also modify html_root_url in the lib.rs
-version = "1.5.0"
+version = "1.5.1"
 authors = ["The rust-url developers"]
 
 description = "URL library for Rust, based on the WHATWG URL Standard"

+ 3 - 0
src/parser.rs

@@ -57,6 +57,9 @@ simple_enum_error! {
     Overflow => "URLs more than 4 GB are not supported",
 }
 
+#[cfg(feature = "heapsize")]
+known_heap_size!(0, ParseError);
+
 impl fmt::Display for ParseError {
     fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
         self.description().fmt(fmt)