If I define a function:
fn f() -> Result<(), E> { // How to return Ok()? }
How can I return the Ok in std::resu
Ok
std::resu
Use Ok(()) as in
Ok(())
fn f() -> Result<(), E> { Ok(()) }
The only value of type () is (), so just put that inside the Ok constructor:
()