pub fn run_fut<F>(f: F) -> Result<()>
where F: Future<Output = anyhow::Result<()>> {
    let rt = tokio::runtime::Runtime::new()?;
    rt.block_on(f)?;
    Ok(())
}
/// Block until a future is finished.
/// The future will be running in a clean tokio runtime, to prevent an unfinished task affecting the test.
Block until a future is finished.
The future will be running in a clean tokio runtime, to prevent an unfinished task affecting the test.
Block until a future is finished . The future will be running in a clean tokio runtime to prevent an unfinished task affecting the test .
pub fn run_fut<F>(f: F) -> Result<()>
where F: Future<Output = anyhow::Result<()>> {
    let rt = tokio::runtime::Runtime::new()?;
    rt.block_on(f)?;
    Ok(())
}
pub fn run_fut < F > ( f : F ) -> Result < ( ) > where F : Future < Output = anyhow :: Result < ( ) > > { let rt = tokio :: runtime :: Runtime :: new ( ) ? ; rt . block_on ( f ) ? ; Ok ( ( ) ) }
Block until a future is finished.
Block until a future is finished .
f
F
f
F