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: tls.rs
    path of file: ./repos/pingora/pingora-core/src/connectors
    
    the code of the file until where you have to start completion: // Copyright 2024 Cloudflare, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License
    
fn replace_leftmost_underscore(sni: &str) -> Option<String> {
    // wildcard is only leftmost label
    let mut s = sni.splitn(2, '.');
    if let (Some(leftmost), Some(rest)) = (s.next(), s.next()) {
        // if not a subdomain or leftmost does not contain underscore return
        if !rest.contains('.') || !leftmost.contains('_') {
            return None;
        }
        // we have a subdomain, replace underscores
        let leftmost = leftmost.replace('_', "-");
        return Some(format!("{leftmost}.{rest}"));
    }
    None
}