Skip to content

Commit 9acda2f

Browse files
chancedanonrig
authored andcommitted
fixes port debug output
1 parent 66050bb commit 9acda2f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,18 +504,16 @@ impl std::fmt::Debug for Url {
504504
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
505505
unsafe {
506506
let components = ffi::ada_get_components(self.url).as_ref().unwrap();
507-
508507
let mut debug = f.debug_struct("Url");
509-
510508
debug
511509
.field("href", &self.href())
512510
.field("protocol_end", &components.protocol_end)
513511
.field("host_start", &components.host_start)
514512
.field("host_end", &components.host_end);
515513
let port = if components.port == u32::MAX {
516-
Some(components.port)
517-
} else {
518514
None
515+
} else {
516+
Some(components.port)
519517
};
520518
let username_end = if components.username_end == u32::MAX {
521519
None

0 commit comments

Comments
 (0)