formats icon indicating copy to clipboard operation
formats copied to clipboard

`SerialNumber::generate` should be infallible

Open str4d opened this issue 11 months ago • 1 comments

The method is currently fallible: https://github.com/RustCrypto/formats/blob/48eac00018b31215141f98550e342da7d40062d6/x509-cert/src/serial_number.rs#L73-L82

However, it's a trivial wrapper around SerialNumber::generate_with_prefix with arguments that mean it cannot fail: https://github.com/RustCrypto/formats/blob/48eac00018b31215141f98550e342da7d40062d6/x509-cert/src/serial_number.rs#L98-L105 https://github.com/RustCrypto/formats/blob/48eac00018b31215141f98550e342da7d40062d6/x509-cert/src/serial_number.rs#L48-L57

str4d avatar Nov 06 '24 06:11 str4d