Skip to content

Commit e60d8e1

Browse files
committed
fix a silly bug where duplicated code for devkit vs prototype wasn't copied over
1 parent 57b2bc4 commit e60d8e1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

napi-rust-drivers/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ impl JsDevkit {
114114
}
115115

116116
#[napi]
117-
pub fn read_memory(&self, well: u8, bytes: u32) -> Result<Vec<u8>> {
117+
pub fn read_memory(&self, well: u8, bytes: u32) -> Result<Buffer> {
118118
let mut buffer = vec![0; bytes as usize];
119119
self.plinth.read_memory(well.into(), &mut buffer).map_err(|e| Error::from_reason(e))?;
120-
Ok(buffer)
120+
Ok(Buffer::from(buffer))
121121
}
122122

123123
#[napi]

napi-rust-drivers/src/plinth.rs

-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ pub struct Prototype {
332332

333333
impl Plinth for Prototype {
334334
fn display_image(&self, well: usize, image: Vec<u8>) {
335-
println!("image vec size is {}", image.len());
336335
let pin_assignments = self.wyldcard_wells[well];
337336

338337
let gpio = Gpio::new().unwrap();

0 commit comments

Comments
 (0)