INDAPlus21 / INDAPlus21/murnion-hash
Pass
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**Very well done Felix!**
Duuuuude! Commands below `panic!`
_Your code_:
```rs
let args = std::env::args()/*...*/;
match args[1]/*...*/ {
"set_database" => {
if args.len() > 2 {
panic!("[FATAL ERROR]: Too many arguments!");
} else if args.len() < 2 {
panic!("[FATAL ERROR]: Not enough arguments!");
}
overwrite_default(args[2].clone()).ok().unwrap();
//...
},
//...
"insert" => {
if args.len() > 3 {
panic!("[FATAL ERROR]: Too many arguments!");
} else if args.len() < 3 {
panic!("[FATAL ERROR]: Not enough arguments!");
}
db.add_value(str_to_hash(args[2].clone().as_str()), args[3].clone());
//...
}
"delete" => {
if args.len() > 2 {
panic!("[FATAL ERROR]: Too many arguments!");
} else if args.len() < 2 {
panic!("[FATAL ERROR]: Not enough arguments!");
}
db.remove_value(str_to_hash(args[2].clone().as_str()));
//...
}
"show" => {
if args.len() > 2 {
panic!("[FATAL ERROR]: Too many arguments!");
} else if args.len() < 2 {
panic!("[FATAL ERROR]: Not enough arguments!");
}
let values = db.find_values(str_to_hash(args[2].clone().as_str()));
//...
}
//...
}
```
Your code would certainly benefit from some proper documentation, since it would ease your referencing in the future.
[](https://insights.stackoverflow.com/survey/2021#section-top-paying-technologies-top-paying-technologies)
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files, tests, or documentation target. Start by locating the Rust CLI entry point that matches set_database, insert, delete, and show, then inspect how their arguments and database operations work. Done is not defined; clarify which commands and documentation format must be covered before starting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100