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: diffing.rs
    path of file: ./repos/LibAFL/utils/build_and_test_fuzzers/src
    
    the code of the file until where you have to start completion: use std::{
    collections::{HashMap, HashSet},
    ffi::OsStr,
    path::{Component, PathBuf},
    process::{Command, Stdio},
};

use walkdir::WalkDir;

#[must_use]
pub fn run_git_diff(args: &[&str]) -> String {
    let output = Command::new("git")
        .stdout(Stdio::piped())
        .arg("diff")
        .args(args)
        .output()
        .expect("git diff failed");

    String::from_utf8(output.stdout).unwrap()
}

#[must_use]
pub fn get_diffing_files(commits: &[String]) -> HashSet<PathBuf> {
    let mut files = HashSet::<PathBuf>::default();
    for commit_name in commits {
        let args = vec!["--name-only", commit_name];
        for file in run_git_diff(&args)
            .lines()
            .map(PathBuf::from)
            .filter(|x| x.is_file())
        {
            files.insert(file);
        }
    }
    files
}

#[allow(clippy::implicit_hasher)]
#[must_use]
pub fn get_diffing_crates(diffing_files: &HashSet<PathBuf>) -> HashSet<PathBuf> {
    // TODO maybe consider
    
pub fn get_diffing_crates(diffing_files: &HashSet<PathBuf>) -> HashSet<PathBuf> {
    // TODO maybe consider using a combination of this and https://docs.rs/cargo/0.28.0/cargo/sources/path/struct.PathSource.html
    let mut crates = HashSet::default();
    for file in diffing_files {
        if let Some(dir) = file.parent() {
            let manifest = dir.join("Cargo.toml");
            if manifest.is_file()
                && cargo_toml::Manifest::from_path(&manifest)
                    .expect("cannot read manifest")
                    .package
                    .is_some()
            {
                crates.insert(manifest);
            } else if let Some(dir1) = dir.parent() {
                let manifest = dir1.join("Cargo.toml");
                if manifest.is_file()
                    && cargo_toml::Manifest::from_path(&manifest)
                        .expect("cannot read manifest")
                        .package
                        .is_some()
                {
                    crates.insert(manifest);
                } else if let Some(dir2) = dir1.parent() {
                    let manifest = dir2.join("Cargo.toml");
                    if manifest.is_file()
                        && cargo_toml::Manifest::from_path(&manifest)
                            .expect("cannot read manifest")
                            .package
                            .is_some()
                    {
                        crates.insert(manifest);
                    }
                }
            }
        }
    }
    crates
}