Skip to content

Commit

Permalink
lint: correct doc comment punctuation
Browse files Browse the repository at this point in the history
  • Loading branch information
dxrcy committed Dec 26, 2024
1 parent 813dfa7 commit 218cf30
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/debugger/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn eval_inner(state: &mut RunState, line: &'static str) -> Result<()> {
Ok(())
}

/// Get an unsafe `&'static str` from a `Box<str>`, for temporary use
/// Get an unsafe `&'static str` from a `Box<str>`, for temporary use.
struct StaticStr {
ptr: *mut str,
}
Expand Down
30 changes: 15 additions & 15 deletions src/debugger/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub struct CommandIter<'a> {
head: usize,
/// Amount of arguments requested (successfully or not).
///
/// Must only be incremented by [`Self::next_argument`]
/// Must only be incremented by [`Self::next_argument`].
arg_count: u8,
}

Expand Down Expand Up @@ -305,7 +305,7 @@ impl<'a> CommandIter<'a> {
)
}

/// Parse and consume next [`MemoryLocation`] argument, defaulting to program counter
/// Parse and consume next [`MemoryLocation`] argument, defaulting to program counter.
/// ([`MemoryLocation::PCOffset`]).
pub fn next_memory_location_or_default(
&mut self,
Expand Down Expand Up @@ -520,23 +520,23 @@ impl<'a> CommandIter<'a> {
/// Extremely liberal in accepted syntax.
///
/// Accepts:
/// - Decimal (optional `#`), hex (`x`/`X`), octal (`o`/`O`), and binary (`b`/`B`)
/// - Optional single zero before non-decimal radix prefix. Eg. `0x4`
/// - Leading zeros after prefix and sign. Eg. `0x0004`, `#-03`
/// - Sign character before xor after radix prefix. Eg. `-#2`, `x+4`
/// - Decimal (optional `#`), hex (`x`/`X`), octal (`o`/`O`), and binary (`b`/`B`).
/// - Optional single zero before non-decimal radix prefix. Eg. `0x4`.
/// - Leading zeros after prefix and sign. Eg. `0x0004`, `#-03`.
/// - Sign character before xor after radix prefix. Eg. `-#2`, `x+4`.
///
/// Returns `Ok(None)` (not an integer) for:
/// - Empty token
/// - Non-decimal radix prefix, with no zero before it, and non-digits after it. Eg. `xLabel`, `o`
/// - Empty token.
/// - Non-decimal radix prefix, with no zero before it, and non-digits after it. Eg. `xLabel`, `o`.
///
/// Returns `Err` (invalid integer and invalid token) for:
/// - Invalid digits for the given radix
/// - Decimal radix prefix `#` with zeros before it. Eg. `0#2`
/// - Decimal radix prefix `#` with no digits after it. Eg. `#`
/// - Multiple sign characters (before or after prefix)
/// - Missing sign character '-' or '+', if `require_sign == true`
/// - Multiple zeros before radix prefix. Eg. `00x4`
/// - Absolute value out of bounds for `i32`. (Does *NOT* check if integer fits in specific bit size)
/// - Invalid digits for the given radix.
/// - Decimal radix prefix `#` with zeros before it. Eg. `0#2`.
/// - Decimal radix prefix `#` with no digits after it. Eg. `#`.
/// - Multiple sign characters (before or after prefix).
/// - Missing sign character '-' or '+', if `require_sign == true`.
/// - Multiple zeros before radix prefix. Eg. `00x4`.
/// - Absolute value out of bounds for `i32`. (Does *NOT* check if integer fits in specific bit size).
fn next_integer_token(&mut self, require_sign: bool) -> Result<Option<i32>, error::Value> {
self.reset_head();
// Don't skip whitespace
Expand Down
2 changes: 1 addition & 1 deletion src/debugger/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ impl TerminalHistory {
Self { list, index, file }
}

/// Push command into list and write to file
/// Push command into list and write to file.
pub fn push(&mut self, command: String) {
if let Some(file) = &mut self.file {
if writeln!(file, "{}", command).is_err() {
Expand Down

0 comments on commit 218cf30

Please sign in to comment.