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: lib.rs
    path of file: ./repos/skytable/libsky/src
    
    the code of the file until where you have to start completion: /*
 * Created on Mon Jul 20 2020
 *
 * This file is a part of Skytable
 * Skytable (formerly known as TerrabaseDB or Skybase) is a free and open-source
 * NoSQL database written by Sayan Nandan ("the Author") with the
 * vision to provide flexibility in data modelling 
    
pub fn format(body: &str, arguments: HashMap<&'static str, &'static str>, auto: bool) -> String {
    use regex::Regex;
    let pattern = r"\{[a-zA-Z_][a-zA-Z_0-9]*\}|\{\}";
    let re = Regex::new(pattern).unwrap();
    re.replace_all(body, |caps: &regex::Captures| {
        let capture: &str = &caps[0];
        let capture = &capture[1..capture.len() - 1];
        match capture {
            "" => {
                panic!("found an empty format")
            }
            "default_tcp_endpoint" if auto => "tcp@127.0.0.1:2003".to_owned(),
            "default_tls_endpoint" if auto => "tls@127.0.0.1:2004".to_owned(),
            "password_env_var" if auto => env_vars::SKYDB_PASSWORD.into(),
            "version" if auto => format!("v{VERSION}"),
            arbitrary => arguments
                .get(arbitrary)
                .expect(&format!("could not find value for argument {}", arbitrary))
                .to_string(),
        }
    })
    .to_string()
}