Skip to content

Commit 7a4b60f

Browse files
committed
style: apply nightly rustfmt formatting
1 parent d0ddc64 commit 7a4b60f

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

crates/feedparser-rs-core/src/parser/rss10.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,7 @@ fn is_dc_tag(name: &[u8]) -> Option<&str> {
393393
if name.starts_with(b"dc:") {
394394
let tag_name = std::str::from_utf8(&name[3..]).ok()?;
395395
// Validate: non-empty and alphanumeric + hyphen only
396-
if !tag_name.is_empty()
397-
&& tag_name
398-
.chars()
399-
.all(|c| c.is_alphanumeric() || c == '-')
400-
{
396+
if !tag_name.is_empty() && tag_name.chars().all(|c| c.is_alphanumeric() || c == '-') {
401397
Some(tag_name)
402398
} else {
403399
None

crates/feedparser-rs-core/src/util/base_url.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ fn is_private_ip(ip: &IpAddr) -> bool {
100100
|| octets[0] == 127
101101
}
102102
IpAddr::V6(ipv6) => {
103-
ipv6.is_loopback()
104-
|| ipv6.is_unspecified()
105-
|| (ipv6.segments()[0] & 0xfe00) == 0xfc00
103+
ipv6.is_loopback() || ipv6.is_unspecified() || (ipv6.segments()[0] & 0xfe00) == 0xfc00
106104
}
107105
}
108106
}

crates/feedparser-rs-core/src/util/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ pub mod sanitize;
1010
pub mod text;
1111

1212
// Re-export commonly used functions
13-
pub use base_url::{is_safe_url, BaseUrlContext, combine_bases, resolve_url};
13+
pub use base_url::{BaseUrlContext, combine_bases, is_safe_url, resolve_url};
1414
pub use date::parse_date;

0 commit comments

Comments
 (0)