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: function_selector.rs
    path of file: ./repos/fuels-rs/packages/fuels-core/src/codec
    
    the code of the file until where you have to start completion: use sha2::{Digest, Sha256};

use crate::types::{param_types::ParamType, ByteArray};

/// Given a function name and its inputs  will return a ByteArray representing
/// the function selector as specified in the Fuel specs.
pub fn resolve_fn_selector(name: &str, inputs: &[ParamType]) -> ByteArray {
    let fn_signature = resolve_fn_signature(name, inputs);

    first_four_bytes_of_sha256_hash(&fn_signature)
}

fn resolve_fn_signature(name: &str, inputs: 
    
    fn handles_primitive_types() {
        let check_selector_for_type = |primitive_type: ParamType, expected_selector: &str| {
            let selector = resolve_fn_signature("some_fun", &[primitive_type]);

            assert_eq!(selector, format!("some_fun({expected_selector})"));
        };

        for (param_type, expected_signature) in [
            (ParamType::U8, "u8"),
            (ParamType::U16, "u16"),
            (ParamType::U32, "u32"),
            (ParamType::U64, "u64"),
            (ParamType::Bool, "bool"),
            (ParamType::B256, "b256"),
            (ParamType::Unit, "()"),
            (ParamType::StringArray(15), "str[15]"),
            (ParamType::StringSlice, "str"),
        ] {
            check_selector_for_type(param_type, expected_signature);
        }
    }