Not sure if that's the correct wording, but basically I have:
let current_recv_buff = match current_down_speed {
0..=1000 => 4,
1001..=10000 => 32,
10001..=100000 => 512,
100001..=1000000 => 4096,
1000001.. => 16384,
_ => 16384,
};
But I repeat this table elsewhere in my code. Can I define it as a variable? Or will I have to make a function for it