INDAPlus21 / INDAPlus21/ellmar-task-2

Pass

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

**Very well done Elliot!**

I like that you didn't make use of `Hashset`. However, the fact that you aren't driven to madness by if-statements as one-liners is beyond me.

You might agree to this:

_Your code_:
```rust
let min_dist = if horiz_dist <= vert_dist {horiz_dist} else {vert_dist};

if min_dist < 10 {print!("{}", min_dist);} else {print!(".");}
```

_Suggestion_:
```rust
match horiz_dist.min(vert_dist) {
_min_dist if _min_dist < 10 => print!("{}", _min_dist),
_ => print!(".")
}
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue only identifies a Rust snippet and suggests replacing its one-line conditional expressions with a match-based form. Locate the code containing horiz_dist and vert_dist, review the surrounding task behavior, and confirm that the output remains unchanged after the style refactor; no file or test is named.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.