Closed repnop closed 2 weeks ago
looks like clippy got some new lints for doc comment formatting, so I added that in as well just so it won't be a problem for future PRs, if that's okay. I can split it off in its ownPR but figured since it was like ~3-4 lines of changes it'd be fine to just sneak in with this
Thank you for your PR!
the
BigInt
s that are used to parse OIDs are downcasted tou32
s later on in the code anyway, so now that we have fixed-sized integer parsing that doesn't roundtrip throughBigInt
s, we can just attempt to deserialize them asu32
s instead of allocating a bunch. this bought me a ~(-72%) benchmark win on parsing an SNMP packet since every varbind value has an associated OID, and got the parse time belownetsnmp
's PDU decode for my microbenchmark :)