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: lint.rs
    path of file: ./repos/hash/.github/scripts/rust
    
    the code of the file until where you have to start completion: //! ```cargo
//! [dependencies]
//! serde = {version = "*", features = ["derive"]}
//! toml = {version = "*", features = ["parse"]}
//! ```

#![allow(non_snake_case)]

extern crate serde;
extern crate toml;

use std::{
    collections::{BTreeSet, HashMap},
    env, fs,
    iter::once,
    path::{Path, PathBuf},
};

use serde::Deserialize;

const PREFIX: &'static str = "## START CLIPPY LINTS ##";
const SUFFIX: &'static str = "## END CLIPPY LINTS ##";

enum LintLevel {
    Allow,
    Warn,
    ForceWarn,
    Deny,
    Forbid,
    
fn collect_lints(cwd: &Path) -> LintFile {
    let mut active = cwd;
    let mut files = vec![];

    // go up the directory tree and find all files in `.config/lints.toml`
    loop {
        let candidate = active.join(".config/lints.toml");

        if candidate.exists() && candidate.is_file() {
            files.push(candidate);
        }

        // we do this until we reach the root of the git repo (a `.git` folder is present)
        if active.join(".git").exists() && active.join(".git").is_dir() {
            break;
        }

        // ... or we have no parent anymore
        if let Some(parent) = active.parent() {
            active = parent;
        } else {
            break;
        }
    }

    // we now apply them into a single configuration this allows for easy overwrites in child
    // directories
    files.reverse();

    let mut lints = Lints::new();

    for file in files {
        let contents =
            fs::read_to_string(&file).expect(&format!("should be able to read {}", file.display()));

        let file =
            toml::from_str(&contents).expect(&format!("should be valid toml ({})", file.display()));
        lints.apply(file);
    }

    lints.into_file()
}