Skip to content

Commit

Permalink
Merge pull request #39 from joshtriplett/code-block-terminators
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Aug 8, 2022
2 parents ec09955 + 3ea3965 commit ce8fc54
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 ce8fc54

Please sign in to comment.