Closed janjaapbos closed 2 years ago
When calling NP_RPC_Factory::new_bytes() with an empty byte slice, it causes a thread panic.
I am new to Rust, so excuse my question: I would have expected the function to fail with an NP_Error.
I am loading the rpc spec in bytes from a remote endpoint, so I wanted to check for validity.
Learned how to handle this error in Rust.
When calling NP_RPC_Factory::new_bytes() with an empty byte slice, it causes a thread panic.
I am new to Rust, so excuse my question: I would have expected the function to fail with an NP_Error.
I am loading the rpc spec in bytes from a remote endpoint, so I wanted to check for validity.