Run clippy fix
This commit is contained in:
@@ -63,7 +63,7 @@ pub fn strip_summary_boilerplate(summary: &str) -> String {
|
||||
text = text[phrase.len()..].trim_start().to_string();
|
||||
// Remove leading punctuation/articles after stripping phrase
|
||||
text = text
|
||||
.trim_start_matches(|c| c == ',' || c == ':' || c == '-')
|
||||
.trim_start_matches([',', ':', '-'])
|
||||
.trim_start()
|
||||
.to_string();
|
||||
break;
|
||||
@@ -71,13 +71,12 @@ pub fn strip_summary_boilerplate(summary: &str) -> String {
|
||||
}
|
||||
|
||||
// Remove any remaining leading markdown bold markers
|
||||
if text.starts_with("**") {
|
||||
if let Some(end) = text[2..].find("**") {
|
||||
if text.starts_with("**")
|
||||
&& let Some(end) = text[2..].find("**") {
|
||||
// Keep the content between ** but remove the markers
|
||||
let bold_content = &text[2..2 + end];
|
||||
text = format!("{}{}", bold_content, &text[4 + end..]);
|
||||
}
|
||||
}
|
||||
|
||||
text.trim().to_string()
|
||||
}
|
||||
@@ -144,7 +143,7 @@ pub async fn generate_daily_summaries(
|
||||
if date >= start && date <= end {
|
||||
messages_by_date
|
||||
.entry(date)
|
||||
.or_insert_with(Vec::new)
|
||||
.or_default()
|
||||
.push(msg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user