* Replace `impl Into<String>` with `impl ToString` This is something I ran into today. Types that implement `std::fmt::Display` cannot be passed to functions that take `impl Into<String>`. You have to call `display_thing.to_string()`. Its a small thing but would be fixed by instead taking `impl ToString`. Afaik `impl ToString` is a superset of `impl Into<String>`, unless users manually implement `Into<String> for T` (or `From<T> for String`) for their own types. However I think its more common to implement `Display` as that works with `println` and friends. The main difference is that `Display::fmt` can return errors but thats also quite rare in my experience. I did some testing in a [playground] and seems to work. [playground]: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=1111e071f6ae416ae2688d58d2e9b575 * Silence warnings |
||
|---|---|---|
| .. | ||
| fonts | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
README.md
epaint - egui paint library
A bare-bones 2D graphics library for turning simple 2D shapes and text into textured triangles.
Made for egui.