summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSavagePeanut <sourcehut@lazytapir.com>2024-08-28 02:52:50 -0500
committerSavagePeanut <sourcehut@lazytapir.com>2024-08-28 02:52:50 -0500
commitb69c79ff3bbeb18f80a6afb6c0479e78e34f1276 (patch)
tree412c7ef25c0e4fdaecd51eba1888ab1601e9b29c /src
parentab36341b9b037e784bb37260f68c23ba6fb92bbc (diff)
fix compiler warnings
Diffstat (limited to 'src')
-rw-r--r--src/matrix.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/matrix.rs b/src/matrix.rs
index 86d4545..305dccc 100644
--- a/src/matrix.rs
+++ b/src/matrix.rs
@@ -34,15 +34,15 @@ pub fn format_for_matrix(body: String, mentions: Option<Vec<(String, usize, usiz
for (keyword, start, remove_start, end, remove_end) in styles {
if DUAL_TAGS.iter().any(|&(k, _)| k == keyword) {
let opening_tag = if keyword == "```language" {
- DUAL_TAGS.iter().find(|&&(k, _)| k == keyword).unwrap().1.0.clone()
+ DUAL_TAGS.iter().find(|&&(k, _)| k == keyword).unwrap().1.0
.replace("{}", &chars[start+3..remove_start-1]
.into_iter()
.collect::<String>())
} else {
- DUAL_TAGS.iter().find(|&&(k, _)| k == keyword).unwrap().1.0.clone().to_owned()
+ DUAL_TAGS.iter().find(|&&(k, _)| k == keyword).unwrap().1.0.to_owned()
};
tags.push((start, opening_tag, remove_start));
- tags.push((end, DUAL_TAGS.iter().find(|&&(k, _)| k == keyword).unwrap().1.1.clone().to_owned(), remove_end));
+ tags.push((end, DUAL_TAGS.iter().find(|&&(k, _)| k == keyword).unwrap().1.1.to_owned(), remove_end));
} else if SINGLE_TAGS.iter().any(|&(k, _)| k == keyword) {
tags.push((start, SINGLE_TAGS.iter().find(|&&(k, _)| k == keyword).unwrap().1.to_owned(), start+1));
}