rusticata / asn1-rs

Parsers/Encoders for ASN.1 BER/DER data
Apache License 2.0
9 stars 14 forks source link

feat: add missing lifetime parameter #12

Closed honsunrise closed 2 years ago

honsunrise commented 2 years ago

Add missing lifetime parameter for ParseResult

chifflier commented 2 years ago

Hi, Thank you for the PR. Before merging, do you have some context on why this would be necessary? It seems to me that the lifetime of the parsed object has a lifetime that can be different from the input (for ex when returning an allocated object like String, whose lifetime can be longer than the input).

honsunrise commented 2 years ago

You are right, this is not necessary. I encountered this problem because of a bug in rustc, it can't correct inferred the lifetime