fn parse_elf_header(path: &Path) -> io::Result<u8> {
    let mut file = File::open(path)?;
    let mut buffer = [0; 5];
    file.read_exact(&mut buffer)?;
    if buffer[..4] == [127, 69, 76, 70] {
        Ok(buffer[4])
    } else {
        Err(Error::new(ErrorKind::InvalidData, "invalid ELF header"))
    }
}
/// Extracts the ELF class from the ELF header in a shared library.

Extracts the ELF class from the ELF header in a shared library.
Extracts the ELF class from the ELF header in a shared library .
fn parse_elf_header(path: &Path) -> io::Result<u8> {
    let mut file = File::open(path)?;
    let mut buffer = [0; 5];
    file.read_exact(&mut buffer)?;
    if buffer[..4] == [127, 69, 76, 70] {
        Ok(buffer[4])
    } else {
        Err(Error::new(ErrorKind::InvalidData, "invalid ELF header"))
    }
}
fn parse_elf_header ( path : & Path ) -> io :: Result < u8 > { let mut file = File :: open ( path ) ? ; let mut buffer = [ 0 ; 5 ] ; file . read_exact ( & mut buffer ) ? ; if buffer [ .. 4 ] == [ 127 , 69 , 76 , 70 ] { Ok ( buffer [ 4 ] ) } else { Err ( Error :: new ( ErrorKind :: InvalidData , " " ) ) } }
Extracts the ELF class from the ELF header in a shared library.
Extracts the ELF class from the ELF header in a shared library .
path
&Path