Use the dyn keyword to specify parse_symbol takes a ref to a Read trait object.

This commit is contained in:
Christopher Cole 2022-10-02 22:43:27 -07:00
parent 44654da0c6
commit 48e4313ce4

View File

@ -253,7 +253,7 @@ impl File {
Ok(symbols)
}
fn parse_symbol(&self, io_section: &mut Read, symbols: &mut Vec<types::Symbol>, link: &[u8]) -> Result<(), ParseError> {
fn parse_symbol(&self, io_section: &mut dyn Read, symbols: &mut Vec<types::Symbol>, link: &[u8]) -> Result<(), ParseError> {
let name: u32;
let value: u64;
let size: u64;