Skip to content

Commit 7d88af1

Browse files
committed
Add HeapSizeOf impl for ParseError
1 parent a12715b commit 7d88af1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/parser.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use std::str;
1313

1414
use Url;
1515
use encoding::EncodingOverride;
16+
#![cfg(feature = "heapsize")] use heapsize::HeapSizeOf;
1617
use host::{Host, HostInternal};
1718
use percent_encoding::{
1819
utf8_percent_encode, percent_encode,
@@ -57,6 +58,13 @@ simple_enum_error! {
5758
Overflow => "URLs more than 4 GB are not supported",
5859
}
5960

61+
#![cfg(feature = "heapsize")]
62+
impl HeapSizeOf for ParseError {
63+
fn heap_size_of_children(&self) -> usize {
64+
0
65+
}
66+
}
67+
6068
impl fmt::Display for ParseError {
6169
fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
6270
self.description().fmt(fmt)

0 commit comments

Comments
 (0)