Skip to content

Commit

Permalink
ravedude: add comments for possibly confusing code
Browse files Browse the repository at this point in the history
  • Loading branch information
Creative0708 authored and Rahix committed Jun 8, 2024
1 parent 0825c28 commit 07e201e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ravedude/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ pub struct BoardAvrdudeOptions {
serialize_with = "serialize_baudrate",
deserialize_with = "deserialize_baudrate"
)]
// Inner option to represent whether the baudrate exists, outer option to allow for overriding.
// Option<if baudrate == -1 { None } else { NonZeroU32(baudrate) }>
pub baudrate: Option<Option<NonZeroU32>>,
pub do_chip_erase: Option<bool>,
}
Expand Down
2 changes: 2 additions & 0 deletions ravedude/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ struct Args {
/// * nano168
/// * duemilanove
#[structopt(name = "BOARD", verbatim_doc_comment)]
// When Ravedude.toml exists, the binary is placed where the board should be. This is an OsString to not lose
// informaton when we have to take the board as the binary.
board: Option<OsString>,

/// The binary to be flashed.
Expand Down

0 comments on commit 07e201e

Please sign in to comment.