Skip to content

Commit

Permalink
Small Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
the-rectifier committed Jan 10, 2022
1 parent 77206bc commit 026bd7d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash

cargo make sudoku
rm -rf target
cargo make sudoku && cargo clean
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ pub fn write_uart(port: &mut Port, data: &[u8]) -> Result<()> {
port.name().expect("Failed to get Uart Name")
);
match port.write(data) {
Ok(len) => {
debug!("Wrote {} bytes!", len);
Ok(_) => {
debug!("Wrote {} bytes!", str::from_utf8(data)?);
}
Err(_) => {
bail!("Unable to Write to Uart");
Expand Down
5 changes: 3 additions & 2 deletions src/sudoku_avr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use rand::{thread_rng, Rng};
use std::fs::{create_dir, OpenOptions};
use std::io::{ErrorKind, Write};
use std::path::PathBuf;
use std::str;
use std::thread;
use std::time::Duration;
use strum_macros::{Display, EnumIter, EnumString};
Expand Down Expand Up @@ -321,8 +322,8 @@ impl SudokuAvr {
match port.write(chunk) {
Ok(_) => {
debug!(
"Wrote {:?} to {:?}",
chunk,
"Wrote {} to {:?}",
str::from_utf8(chunk)?,
port.name().expect("Failed to get UART Name")
);
port.flush().expect("Unable to Flush!");
Expand Down

0 comments on commit 026bd7d

Please sign in to comment.