xor in header.rs does not actually compute the exclusive or of a and b. Instead it checks that a and b are either both true or both false, which is equivalent to a == b. I don't understand what decode does well enough to know if this is the intended behavior or not, but either the name or the implementation is currently wrong. If you do actually need xor there's the ^ operator and the BitXor trait.
xor
in header.rs does not actually compute the exclusive or ofa
andb
. Instead it checks thata
andb
are either both true or both false, which is equivalent toa == b
. I don't understand whatdecode
does well enough to know if this is the intended behavior or not, but either the name or the implementation is currently wrong. If you do actually needxor
there's the^
operator and theBitXor
trait.