You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let capabilities = ifletSome(capabilities) = capabilities {
capabilities
}else{
returnErr(Err::Error((input,ErrorKind::NoneOf)));
};
It is needed when the Msi packet don't have a Request subpacket or Capability subpacket,
Now we return with ErrorKind::NoneOf, but it would be better to return with exact explanation why the error occurred.
Nom 5 don't have custom ErrorKind now.
But I want to return with custom error kind in this situation.
tox/src/toxcore/messenger/packet/msi.rs
Lines 237 to 246 in a8d0e56
It is needed when the Msi packet don't have a Request subpacket or Capability subpacket,
Now we return with ErrorKind::NoneOf, but it would be better to return with exact explanation why the error occurred.
The error kinds I want to use are
const NOM_CUSTOM_ERR_REQUEST_SUBPACKET_OMITTED: u32 = 1;
const NOM_CUSTOM_ERR_CAPABILITIES_SUBPACKET_OMITTED: u32 = 2;
Any idea?
The text was updated successfully, but these errors were encountered: