Skip to content

Commit 0ac4e6c

Browse files
committed
chore: fix clippy
Signed-off-by: Dmitry Dygalo <[email protected]>
1 parent b055066 commit 0ac4e6c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

css-inline/src/html/serializer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl<'a, W: Write> HtmlSerializer<'a, W> {
177177
"<" => self.writer.write_all(b"&lt;")?,
178178
">" => self.writer.write_all(b"&gt;")?,
179179
_ => unreachable!("Only the variants above are searched"),
180-
};
180+
}
181181
last_end = start.checked_add(part.len()).expect("Size overflow");
182182
}
183183
self.writer.write_all(
@@ -201,7 +201,7 @@ impl<'a, W: Write> HtmlSerializer<'a, W> {
201201
"\u{00A0}" => self.writer.write_all(b"&nbsp;")?,
202202
"\"" => self.writer.write_all(b"&quot;")?,
203203
_ => unreachable!("Only the variants above are searched"),
204-
};
204+
}
205205
last_end = start.checked_add(part.len()).expect("Size overflow");
206206
}
207207
self.writer.write_all(
@@ -426,7 +426,7 @@ fn write_declaration_value<Wr: Write>(writer: &mut Wr, value: &str) -> Result<()
426426
)?;
427427
} else {
428428
writer.write_all(value.as_bytes())?;
429-
};
429+
}
430430
Ok(())
431431
}
432432

@@ -485,7 +485,7 @@ fn merge_styles<Wr: Write>(
485485
let mut buffer = Vec::with_capacity(estimated_declaration_size);
486486
write_declaration(&mut buffer, &property, value)?;
487487
declarations_buffer.push(buffer);
488-
};
488+
}
489489
}
490490
// Keep the number of current declarations to write them last as they have the precedence
491491
let current_declarations_count = parsed_declarations_count;

css-inline/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ impl<'a> CSSInliner<'a> {
503503
// Valid absolute URL
504504
if Url::parse(href).is_ok() {
505505
return Cow::Borrowed(href);
506-
};
506+
}
507507
if let Some(base_url) = &self.options.base_url {
508508
// Use the same scheme as the base URL
509509
if href.starts_with("//") {
@@ -513,7 +513,7 @@ impl<'a> CSSInliner<'a> {
513513
if let Ok(new_url) = base_url.join(href) {
514514
return Cow::Owned(new_url.into());
515515
}
516-
};
516+
}
517517
// If it is not a valid URL and there is no base URL specified, we assume a local path
518518
Cow::Borrowed(href)
519519
}

0 commit comments

Comments
 (0)