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: select.rs
    path of file: ./repos/dra/src/cli
    
    the code of the file until where you have to start completion: use crate::github::release::Asset;
use crate::HandlerError;
use dialoguer::theme::ColorfulTheme;
use dialoguer::Select;

pub struct Messages<'a> {
    pub select_prompt: &'a str,
    pub quit_select: &'a str,
}

pub type AskSelectAssetR
    
pub fn ask_select_asset(assets: Vec<Asset>, messages: Messages) -> AskSelectAssetResult {
    let items = assets_names(&assets);
    let index = Select::with_theme(&ColorfulTheme::default())
        .with_prompt(messages.select_prompt)
        .default(0)
        .items(&items)
        .interact_opt()
        .map_err(|e| HandlerError::new(e.to_string()))?;
    if index.is_none() {
        return Err(HandlerError::op_cancelled(messages.quit_select));
    }
    let selected_name = &items[index.unwrap()];
    Ok(find_asset_by_name(selected_name, assets))
}