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: utmp.rs
    path of file: ./repos/coreutils/coreutils_core/src/os
    
    the code of the file until where you have to start completion: //! Account database module
use std::{
    collections::{hash_
    
    fn from(utm: Utmp) -> Self {
        use self::consts::*;

        let mut ut_name = [0; USER_SIZE];
        let mut ut_line = [0; LINE_SIZE];
        #[cfg(any(target_os = "netbsd", target_os = "openbsd"))]
        let mut ut_host = [0; HOST_SIZE];
        #[cfg(any(target_os = "solaris", target_os = "illumos"))]
        let mut ut_id = [0; ID_SIZE];

        utm.user.iter().enumerate().for_each(|(i, c)| ut_name[i] = *c as c_char);
        utm.line.iter().enumerate().for_each(|(i, c)| ut_line[i] = *c as c_char);
        #[cfg(any(target_os = "netbsd", target_os = "openbsd"))]
        utm.host.iter().enumerate().for_each(|(i, c)| ut_host[i] = *c as c_char);
        #[cfg(any(target_os = "solaris", target_os = "illumos"))]
        utm.id.iter().enumerate().for_each(|(i, c)| ut_id[i] = *c as c_char);

        #[cfg(any(target_os = "solaris", target_os = "illumos"))]
        let ut_type = match utm.ut_type.try_into() {
            Ok(a) => a,
            Err(e) => panic!("{}", e),
        };

        utmp {
            #[cfg(any(target_os = "netbsd", target_os = "openbsd"))]
            ut_name,
            #[cfg(any(target_os = "solaris", target_os = "illumos"))]
            ut_user: ut_name,
            ut_line,
            ut_time: utm.time,
            #[cfg(any(target_os = "netbsd", target_os = "openbsd"))]
            ut_host,
            #[cfg(any(target_os = "solaris", target_os = "illumos"))]
            ut_id,
            #[cfg(any(target_os = "solaris", target_os = "illumos"))]
            ut_pid: utm.pid,
            #[cfg(any(target_os = "solaris", target_os = "illumos"))]
            ut_type,
            #[cfg(any(target_os = "solaris", target_os = "illumos"))]
            ut_exit: utm.exit,
        }
    }