rust_d3_geo icon indicating copy to clipboard operation
rust_d3_geo copied to clipboard

Start using thread local from strings

Open martinfrances107 opened this issue 2 years ago • 1 comments

martinfrances107 avatar May 10 '23 10:05 martinfrances107

There are a couple of places where I use this array of strings

let fill: [&str; 7] = [
    "fill: red",
    "fill: orange",
    "fill: olive",
    "fill: blue",
    "fill: indigo",
    "fill: brown",
    "fill: silver",
];

I think in some places this can be a thread local variable, that is allocated once, and persists over many call and is destoy when the page is delete.

this is only a rough idea I want to investigate

martinfrances107 avatar May 10 '23 10:05 martinfrances107