Skip to content

Commit f0f3e10

Browse files
committed
fix typo
1 parent f2614f4 commit f0f3e10

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/api/explain_request.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,15 @@ impl ExplainRequestOutput {
6262
explain_request_input: ExplainRequestProjectInput,
6363
existing_router: Arc<Router<Rule>>,
6464
) -> Result<ExplainRequestOutput, ExplainRequestOutputError> {
65-
let explain_request_router = explain_request_input.change_set.update_existing_router(existing_router.clone());
65+
let explain_request_router = explain_request_input.change_set.update_existing_router(existing_router);
6666

6767
Self::create_result(&explain_request_router, &explain_request_input.example)
6868
}
6969

7070
pub fn create_result_without_project(
7171
explain_request_input: ExplainRequestInput,
7272
) -> Result<ExplainRequestOutput, ExplainRequestOutputError> {
73-
let router_config = explain_request_input.router_config;
74-
let mut router = Router::<Rule>::from_config(router_config.clone());
73+
let mut router = Router::<Rule>::from_config(explain_request_input.router_config);
7574

7675
for rule in explain_request_input.rules.rules.iter() {
7776
router.insert(rule.clone());

src/api/test_examples.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub struct ErroredExample {
7373

7474
impl TestExamplesOutput {
7575
pub fn from_project(test_examples_input: TestExamplesProjectInput, existing_router: Arc<Router<Rule>>) -> TestExamplesOutput {
76-
let test_example_router = test_examples_input.change_set.update_existing_router(existing_router.clone());
76+
let test_example_router = test_examples_input.change_set.update_existing_router(existing_router);
7777
let mut results = TestExamplesOutput::default();
7878

7979
for (id, route) in test_example_router.routes() {

src/api/unit_ids.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub struct RuleOutput {
4646
impl UnitIdsOutput {
4747
#[cfg(feature = "router")]
4848
pub fn create_result_from_project(unit_ids_input: UnitIdsProjectInput, existing_router: Arc<Router<Rule>>) -> UnitIdsOutput {
49-
let unit_ids_router = unit_ids_input.change_set.update_existing_router(existing_router.clone());
49+
let unit_ids_router = unit_ids_input.change_set.update_existing_router(existing_router);
5050
let mut rules = HashMap::new();
5151

5252
for (id, route) in unit_ids_router.routes() {

0 commit comments

Comments
 (0)