Skip to content

Commit aa804e6

Browse files
committed
fix: clippy lints
1 parent 7e4f5bc commit aa804e6

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/app_ui/helpers/tasks.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ pub async fn run_or_submit_question(
106106
.await
107107
{
108108
Ok(resp) => {
109-
*test_cases_stdin =
110-
Some(resp.data.question.example_testcase_list.clone().join("\n"));
109+
*test_cases_stdin = Some(resp.data.question.example_testcase_list.join("\n"));
111110
}
112111
Err(e) => {
113112
return TaskResponse::Error(Response {

src/app_ui/widgets/popup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl Widget for Popup {
105105
PopupType::List { popup: l, .. } => l.get_key_set(),
106106
};
107107
self.popup_type = Some(content.popup);
108-
self.get_help_texts_mut().extend(content.help_texts.clone());
108+
self.get_help_texts_mut().extend(content.help_texts);
109109
// extend help specific to the popup recieved
110110
self.get_help_texts_mut().extend(extended_help);
111111
}

src/app_ui/widgets/question_list.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ impl QuestionListWidget {
240240
.send(
241241
crate::app_ui::async_task_channel::TaskRequest::CodeRunRequest(Request {
242242
widget_name: self.get_widget_name(),
243-
request_id: random_key.clone(),
243+
request_id: random_key,
244244
content,
245245
}),
246246
)
@@ -512,7 +512,7 @@ impl QuestionListWidget {
512512
let k = self
513513
.cache
514514
.get_or_insert_mut(model.clone(), CachedQuestion::default);
515-
(k, model.clone())
515+
(k, model)
516516
}
517517

518518
fn run_or_submit_code_event_handler(
@@ -620,7 +620,7 @@ impl super::Widget for QuestionListWidget {
620620
let title = "Select Language".to_string();
621621
let popup_key = generate_random_string(10);
622622
self.task_map
623-
.insert(popup_key.clone(), (model.clone(), TaskType::Edit));
623+
.insert(popup_key.clone(), (model, TaskType::Edit));
624624
let notif =
625625
self.popup_list_notification(content, title, popup_key, IndexSet::new());
626626
return Ok(Some(notif));
@@ -878,7 +878,7 @@ impl super::Widget for QuestionListWidget {
878878
ParsedResponse::Unknown(_) => "Unknown Error".to_string(),
879879
};
880880
let notification = self.popup_paragraph_notification(
881-
k.to_string(),
881+
k,
882882
format!("{} Status", (if is_submit { "Submit" } else { "Run" })),
883883
IndexSet::new(),
884884
);
@@ -977,7 +977,7 @@ impl super::Widget for QuestionListWidget {
977977
selected_lang,
978978
Some(description),
979979
Some(selected_snippet),
980-
question_id.to_string(),
980+
question_id,
981981
);
982982
let save_path = sf.get_save_path(&dir);
983983
sf.create_if_not_exists(&dir)?;

0 commit comments

Comments
 (0)