Comment by benterix
I'm new to Rust, can someone tell me if that's good Rust code I could learn from?
https://github.com/achristmascarl/rainfrog/blob/main/src/app...
I'm new to Rust, can someone tell me if that's good Rust code I could learn from?
https://github.com/achristmascarl/rainfrog/blob/main/src/app...
on a more serious note, the library i used for the query editor, tui-textarea [0], is very well done, and the other db tui i drew inspiration from, gobang[1], is a great example of a ratatui app. would recommend checking those out
Looks great! I'll be watching your progress with great interest.
What do you use for the DataTable widget? Is there a Rust/Ratatui equivalent of DataTable (https://textual.textualize.io/widgets/data_table/) used by Harlequin?
yep! ratatui has the Table widget: https://docs.rs/ratatui/latest/ratatui/widgets/struct.Table....
I only looked at the linked file, so I'm not going to speak to the rest of the code and don't really have a good grasp of the architecture here.
This seems mostly ok. The only thing that (imo) wouldn't pass code review is that big honking loop at https://github.com/achristmascarl/rainfrog/blob/main/src/app.... That thing needs to be refactored down to be readable, with individual logic chunks being put into their own functions and tidied up a bit.
That's not really Rust-specific, obviously, but all the `match` and `if let` and whatever other Rust stuff looks fine, so it's what I've got.