ratatui-org / ratatui-website

Ratatui Documentation
http://ratatui.rs/
MIT License
95 stars 57 forks source link

Compilation Error in Counter Tutorial #649

Closed senchaaa closed 1 week ago

senchaaa commented 1 week ago

Hi there! I was recently working through the Counter App tutorial to get started with Ratatui. When I completed the exercise, and went to compile my program, I got an error from the compiler that there was an ambiguous import at the beginning of the main.rs file, between the imports for prelude and widgets::blocks. These both contain an implementation of the Position class, which gets used on line 111. I believe this is because the main ratatui repo recently added a Position type to the prelude.rs file., and what we really want to use in this example is the Position from the widgets::blocks import.

joshka commented 1 week ago

Thanks for the heads up - this should be fixed up now. Please let us know if you're still having trouble with this. I've removed the prelude code in preference for pointing at the actual modules as this was generally easier to understand by many users.