Skip to content

Commit

Permalink
Fix missing code block terminators in docstrings
Browse files Browse the repository at this point in the history
A few docstrings have code blocks without ending triple-backquotes. Add
those, to fix parsing in tools like syntax highlighters.
  • Loading branch information
joshtriplett committed Aug 8, 2022
1 parent ec09955 commit 3ea3965
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ impl TestGenerator {
/// ty.to_string()
/// }
/// });
/// ```
pub fn type_name<F>(&mut self, f: F) -> &mut Self
where
F: Fn(&str, bool, bool) -> String + 'static,
Expand All @@ -418,6 +419,7 @@ impl TestGenerator {
/// cfg.field_name(|_s, field| {
/// field.replace("foo", "bar")
/// });
/// ```
pub fn field_name<F>(&mut self, f: F) -> &mut Self
where
F: Fn(&str, &str) -> String + 'static,
Expand Down Expand Up @@ -493,6 +495,7 @@ impl TestGenerator {
/// cfg.const_cname(|c| {
/// c.replace("FOO", "foo")
/// });
/// ```
pub fn const_cname<F>(&mut self, f: F) -> &mut Self
where
F: Fn(&str) -> String + 'static,
Expand All @@ -518,6 +521,7 @@ impl TestGenerator {
/// cfg.skip_field(|s, field| {
/// s == "foo_t" || (s == "bar_t" && field == "bar")
/// });
/// ```
pub fn skip_field<F>(&mut self, f: F) -> &mut Self
where
F: Fn(&str, &str) -> bool + 'static,
Expand Down

0 comments on commit 3ea3965

Please sign in to comment.