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/Toshi/toshi-raft/src
    
    the code of the file until where you have to start completion: use std::sync::Arc;
use std::time::{Duration, Instant};

use dashmap::DashMap;
use http::Uri;
use prost::Message;
use raft::eraftpb::Message as RaftMessage;
use 
    
pub async fn handle_messages(msgs: Vec<raft::eraftpb::Message>, nodes: Arc<DashMap<String, Uri>>) -> Result<()> {
    for msg in msgs {
        let to = msg.to;
        let node = nodes
            .get(&to.to_string())
            .ok_or_else(|| Error::RPCError(format!("Unable to get node for: {}", &to)))?;

        let mut client = create_client(&node, None).await?;
        let req = RaftRequest { message: Some(msg) };
        client.raft_request(req).await?;
    }

    Ok(())
}