Skip to content

Commit

Permalink
Removes redundant clone
Browse files Browse the repository at this point in the history
  • Loading branch information
sanpii committed Dec 27, 2019
1 parent d78e568 commit 7a7b871
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/agenda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl Widget {
})
.collect();

tasks.clone()
tasks
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ impl Widget {
task.note = match task.note {
todo_txt::task::Note::Long { ref filename, .. } => todo_txt::task::Note::Long {
filename: filename.to_string(),
content: new_note.clone(),
content: new_note,
},
_ => {
if new_note.is_empty() {
todo_txt::task::Note::None
} else {
todo_txt::task::Note::Short(new_note.clone())
todo_txt::task::Note::Short(new_note)
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/calendar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl relm::Widget for Calendar {

fn model(relm: &relm::Relm<Self>, label: String) -> Model {
Model {
label: label.clone(),
label,
popover: gtk::Popover::new(None::<&gtk::Calendar>),
calendar: gtk::Calendar::new(),
relm: relm.clone(),
Expand Down

0 comments on commit 7a7b871

Please sign in to comment.