Fix linting issues.

This commit is contained in:
Bauke 2024-02-25 13:12:20 +01:00
parent bbf4af2b19
commit 31a459637c
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 4 additions and 4 deletions

View File

@ -64,7 +64,7 @@ pub enum TopicAuthor {
/// The topic was posted by Tildes itself. /// The topic was posted by Tildes itself.
/// ///
/// Technically the user for this is [Tildes](https://tildes.net/user/tildes) /// Technically the user for this is [Tildes](https://tildes.net/user/tildes)
/// but in the topic it says "Automatically posted <date>" where the username /// but in the topic it says "Automatically posted &lt;date&gt;" where the username
/// normally goes, so may as well special-case it here too. /// normally goes, so may as well special-case it here too.
Scheduled, Scheduled,
@ -110,7 +110,7 @@ impl Topic {
} else { } else {
TopicAuthor::Name( TopicAuthor::Name(
topic_byline topic_byline
.split(" ") .split(' ')
.last() .last()
.ok_or(ParseError::MissingExpectedHtml)? .ok_or(ParseError::MissingExpectedHtml)?
.to_string(), .to_string(),
@ -121,7 +121,7 @@ impl Topic {
select_first_element_text(topic_article_element, &TOPIC_COMMENT_COUNT) select_first_element_text(topic_article_element, &TOPIC_COMMENT_COUNT)
{ {
comment_total comment_total
.split(" ") .split(' ')
.next() .next()
.map(|count| count.parse::<i32>()) .map(|count| count.parse::<i32>())
.ok_or(ParseError::MissingExpectedHtml)? .ok_or(ParseError::MissingExpectedHtml)?
@ -154,7 +154,7 @@ impl Topic {
"", "",
) )
.to_string(); .to_string();
assert!(group.starts_with("~")); assert!(group.starts_with('~'));
let id = topic_article_element let id = topic_article_element
.value() .value()