I’m writing an ELO calculator.
const PD_TABLE: [(u16, u16, f32)] = [
(0, 3, 0.50),
(4, 10, 0.51),
(11, 17, 0.52),
(18, 25, 0.53),
(26, 32, 0.54),
(33, 39, 0.55),
(40, 46, 0.56),
(47, 53, 0.57),
(54, 61, 0.58),
(62, 68, 0.59),
(69, 76, 0.60),
(77, 83, 0.61),
(84, 91, 0.62),
(92, 98, 0.63),
(99, 106, 0.64),
(107, 113, 0.65),
(114, 121, 0.66),
(122, 129, 0.67),
(130, 137, 0.68),
(138, 145, 0.69),
(146, 153, 0.70),
(154, 162, 0.71),
(163, 170, 0.72),
(171, 179, 0.73),
(180, 188, 0.74),
(189, 197, 0.75),
(198, 206, 0.76),
(207, 215, 0.77),
(216, 225, 0.78),
(226, 235, 0.79),
(236, 245, 0.80),
(246, 256, 0.81),
(257, 267, 0.82),
(268, 278, 0.83),
(279, 290, 0.84),
(291, 302, 0.85),
(303, 315, 0.86),
(316, 328, 0.87),
(329, 344, 0.88),
(345, 357, 0.89),
(358, 374, 0.90),
(375, 391, 0.91),
(392, 411, 0.92),
(412, 432, 0.93),
(433, 456, 0.94),
(457, 484, 0.95),
(485, 517, 0.96),
(518, 559, 0.97),
(560, 619, 0.98),
(620, 735, 0.99),
(735, 10000, 1.00),
];
I’m getting the following error :
the size for values of type [(u16, u16, f32)]
cannot be known at compilation time
the trait Sized
is not implemented for [(u16, u16, f32)]
However it seems pretty clear to me what the size of such a record would be. I don’t why the compiler can’t compute it. How can I help it out ?