Skip to content

Commit

Permalink
docs: fix doctest error
Browse files Browse the repository at this point in the history
For doctests, there is no keyword `no-run`.
Doctests recognizes `no_run`, but this still compiles the code,
which will fail in this case.

We could fixup these examples with some hidden lines so that they
compile, but since we don't really use rustdoc currently, let's
just have the compiler ignore these examples.

Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
  • Loading branch information
fitzthum committed Oct 8, 2024
1 parent b96ccf6 commit 618849b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kbs/src/http/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ pub enum Error {
}

/// For example, if we want to raise an error of `MissingCookie`
/// ```no-run
/// ```ignore
/// raise_error!(Error::MissingCookie);
/// ```
/// is short for
/// ```no-run
/// ```ignore
/// return Err(Error::MissingCookie);
/// ```
#[macro_export]
Expand Down

0 comments on commit 618849b

Please sign in to comment.