Skip to content

Commit b17ffd2

Browse files
author
Paolo Tranquilli
committed
Shared: finish fixing clippy warnings
1 parent 87a271c commit b17ffd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shared/tree-sitter-extractor/src/diagnostics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl LogWriter {
124124
match std::fs::OpenOptions::new()
125125
.create(true)
126126
.append(true)
127-
.write(true)
127+
128128
.open(path)
129129
{
130130
Err(e) => {
@@ -241,7 +241,7 @@ impl DiagnosticMessage {
241241
}
242242

243243
fn text(&mut self, text: &str) -> &mut Self {
244-
self.plaintext_message = text.to_owned();
244+
text.clone_into(&mut self.plaintext_message);
245245
self
246246
}
247247

@@ -286,7 +286,7 @@ impl DiagnosticMessage {
286286
}
287287

288288
pub fn markdown(&mut self, text: &str) -> &mut Self {
289-
self.markdown_message = text.to_owned();
289+
text.clone_into(&mut self.markdown_message);
290290
self
291291
}
292292
pub fn severity(&mut self, severity: Severity) -> &mut Self {

0 commit comments

Comments
 (0)