You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: utils.rs
    path of file: ./repos/zbox/src/base
    
    the code of the file until where you have to start completion: use std::time::Duration;

#[cfg(any(
    feature = "storage-file",
    all(feature = "storage-zbox", not(target_arch = "wasm32"))
))]
use crate::error::{Error, Result};

/// Calculate 
    
pub fn remove_empty_parent_dir(path: &std::path::Path) -> Result<()> {
    for parent in path.ancestors().skip(1) {
        match std::fs::read_dir(parent) {
            Ok(dirs) => {
                if dirs.count() > 0 {
                    break;
                }
            }
            Err(ref err) if err.kind() == std::io::ErrorKind::NotFound => break,
            Err(err) => return Err(Error::from(err)),
        }
        std::fs::remove_dir(&parent)?;
    }
    Ok(())
}