Description
I was browsing the r2pipe.rs code when I noticed a repeated match statement in cmd, cmdj and close.
I thought that since the methods are the same that we could put them in a trait and have a method that does all the matching. I have tested it with main.rs. The result is only a 10 line reduction so I don't know if this is a helpful change considering the added complexity.
Checklist
Description I was browsing the r2pipe.rs code when I noticed a repeated match statement in cmd, cmdj and close. I thought that since the methods are the same that we could put them in a trait and have a method that does all the matching. I have tested it with main.rs. The result is only a 10 line reduction so I don't know if this is a helpful change considering the added complexity.