SQ in silver chrome letters, a lab's gear stacked against the S: a rack, two oscilloscopes, pizza boxes and a six-pack. Strange Query Lab

CARDIAC › rust-cardiac › Message codes › RCE0024

RCE0024error

A resource loaded twice.

error[RCE0024]: resource {name} is loaded twice: load it once and pass the array on

The same resource loaded by two calls of load_resource.

The loader fills a resource's cells once, when the deck is read. A second call would be a second array with the same cells.

Load it once, in main, and pass the array (by reference) to whatever needs it.

let t: [i16; 10] = load_resource("squares");
show(&t);
sum(&t);

In a terminal: cargo cardiac help RCE0024.