luke-rt / asciiframe

A CLI tool that converts videos to ASCII and displays them to the terminal on the fly
https://crates.io/crates/asciiframe
MIT License
23 stars 0 forks source link

convert strategy to enum; cleanup renderer.rs imports; cleanup converter.rs functions #9

Closed Crypto-Spartan closed 2 years ago

Crypto-Spartan commented 2 years ago

This should work properly, it is able to compile without issue. However, I had issues with opencv (I'm using repl.it) so I couldn't test the full functionality.

In converter.rs, you had redundant match statements as well as redundant functions (to_ascii & to_ascii_color). I removed the redundant parts and simplified the code. Additionally, I was able to remove the error paths from the match statement since matching on an enum in Rust is exhaustive.

Let me know if you have any questions about the changes I made, happy to explain if needed.