egui/epi
David Pedersen 02a62d1986
Replace impl Into<String> with impl ToString (#302)
* 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
2021-04-29 19:49:49 +02:00
..
src Replace impl Into<String> with impl ToString (#302) 2021-04-29 19:49:49 +02:00
Cargo.toml Try to allow turning off default_fonts for all libs (#266) 2021-04-07 20:14:44 +02:00
README.md Rename Egui to egui 2021-01-17 14:48:59 +01:00

egui app programming interface

Backend-agnostic interface for writing apps using egui (a platform agnostic GUI library).

This crate provides a common interface for programming an app using egui, which can then be easily plugged into egui_frame (which in a wrapper over egui_web or egui_glium).