Давид качи първо решение на 21.10.2022 00:47 (преди почти 3 години)
lol, forgot a &self in a match expression
Compiling solution v0.1.0 (/tmp/d20230111-3772066-18e6krg/solution) Finished test [unoptimized + debuginfo] target(s) in 0.60s Running tests/solution_test.rs (target/debug/deps/solution_test-0edbea2040daef01) running 5 tests test solution_test::test_hsv_display ... ok test solution_test::test_invert_hsv ... ok test solution_test::test_invert_rgb ... ok test solution_test::test_rgb_display ... ok test solution_test::test_new_hsv ... ok test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
lol, forgot a &self in a match expression
Had a bit of fun with nested functions, enjoy! :D In case you find nested ifs prettier, then... oh well :P
Лошо няма, експериментирайте на воля :)