since we're still not sure about where to go with features I went ahead with some api and performance improvements
Pak::read now takes a mutable reference to a reader since it doesn't need to consume or store it (the &mut * is just a reborrow - it doesn't actually have a performance impact since nothing is cloned)
encrypt takes an Option<&Aes> instead of an &Option<Aes> which gets rid of a bunch of unnecessary key clones
a new method has been added for cases when the game is known
since we're still not sure about where to go with features I went ahead with some api and performance improvements
Pak::read
now takes a mutable reference to a reader since it doesn't need to consume or store it (the&mut *
is just a reborrow - it doesn't actually have a performance impact since nothing is cloned)Option<&Aes>
instead of an&Option<Aes>
which gets rid of a bunch of unnecessary key clonesnew
method has been added for cases when the game is known