Fix recent clippy lints

This commit is contained in:
2019-11-13 19:55:33 +01:00
parent 2e58861285
commit d7f3ded7e0
4 changed files with 7 additions and 8 deletions

View File

@@ -30,8 +30,8 @@ pub struct Machine {
#[cfg(feature = "bonus:heap")]
pub heap: Heaps,
pub stream_in: Box<Read + Send + Sync>,
pub stream_out: Arc<Mutex<Write + Send + Sync>>,
pub stream_in: Box<dyn Read + Send + Sync>,
pub stream_out: Arc<Mutex<dyn Write + Send + Sync>>,
}
impl Machine {
@@ -170,7 +170,7 @@ impl Machine {
}
self.block.seek(checkpoint).unwrap();
Ok((name.to_string(), params))
Ok(((*name).to_string(), params))
}
// pub fn get_stack_pointer(&self) -> usize {
@@ -185,11 +185,11 @@ impl Machine {
Ok(self.block.read_u8()? as usize)
}
pub fn set_input(&mut self, instream: Box<Read + Send + Sync>) {
pub fn set_input(&mut self, instream: Box<dyn Read + Send + Sync>) {
self.stream_in = instream;
}
pub fn set_output(&mut self, outstream: Arc<Mutex<Write + Send + Sync>>) {
pub fn set_output(&mut self, outstream: Arc<Mutex<dyn Write + Send + Sync>>) {
self.stream_out = outstream;
}
}