colored icon indicating copy to clipboard operation
colored copied to clipboard

Creation of colored strings should probably be `const fn`

Open PvdBerg1998 opened this issue 5 years ago • 4 comments

See title. I don't know if this is already possible using the current possibilities of const fn, but setting a color on a constant string is definitely something I would expect to be possible.

PvdBerg1998 avatar Mar 04 '19 15:03 PvdBerg1998

That's a great idea ! Would you like to try a PR ? I currently does not have time to work on it.

mackwic avatar Apr 30 '19 07:04 mackwic

I'd be happy to take a stab at this, if no one else is planning on doing it!

maxrumsey avatar Jan 02 '20 00:01 maxrumsey

@maxrumsey Please do =)

kurtlawrence avatar Jan 02 '20 06:01 kurtlawrence

I tried to do this, and it's a lot more complex than I thought it would be. You can't use Strings in const fns so it needs to be a separate struct with a &str and a bunch of const fns for coloring + styling.

sameer avatar Aug 04 '20 14:08 sameer