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: msg_tests.rs
    path of file: ./repos/runng/runng/tests/tests
    
    the code of the file until where you have to start completion: use crate::common::*;
use rand::Rng;

#[test]
fn equality() -> runng::Result<()> {
    // Cloned messages are equal
    let msg = rand_msg()?;
    let dupe = msg.clone();
    assert_eq!(msg
    
fn equality() -> runng::Result<()> {
    // Cloned messages are equal
    let msg = rand_msg()?;
    let dupe = msg.clone();
    assert_eq!(msg, dupe);

    // Different body are not equal
    {
        let mut other = NngMsg::with_capacity(128)?;
        rand::thread_rng().fill(other.as_mut_slice());
        assert_ne!(msg, other);
    }

    // Different header are not equal
    {
        let mut msg = rand_msg()?;
        let mut dupe = msg.clone();

        let header_bytes = vec![0, 1, 2, 3];
        dupe.header_append_slice(header_bytes.as_slice())?;
        assert_ne!(msg, dupe);

        // Same header are
        msg.header_append_slice(header_bytes.as_slice())?;
        assert_eq!(msg, dupe);
    }

    // Empty messages are equal
    {
        let empty0 = NngMsg::new()?;
        let empty1 = NngMsg::new()?;
        assert_eq!(empty0, empty1);
    }
    Ok(())
}