Skip to content

Commit 2df02c2

Browse files
authored
docs: fix/improve readability of regex args explanation (#2585)
* docs: fix/improve readability of regex args explanation * extraneous word
1 parent 251dec9 commit 2df02c2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

bindgen/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,26 +263,26 @@ impl std::fmt::Display for Formatter {
263263
///
264264
/// # Regular expression arguments
265265
///
266-
/// Some [`Builder`] methods such as the `allowlist_*` and `blocklist_*` methods allow regular
266+
/// Some [`Builder`] methods, such as `allowlist_*` and `blocklist_*`, allow regular
267267
/// expressions as arguments. These regular expressions will be enclosed in parentheses and
268-
/// anchored with `^` and `$`. So if the argument passed is `<regex>`, the regular expression to be
268+
/// anchored with `^` and `$`. So, if the argument passed is `<regex>`, the regular expression to be
269269
/// stored will be `^(<regex>)$`.
270270
///
271271
/// As a consequence, regular expressions passed to `bindgen` will try to match the whole name of
272272
/// an item instead of a section of it, which means that to match any items with the prefix
273273
/// `prefix`, the `prefix.*` regular expression must be used.
274274
///
275275
/// Certain methods, like [`Builder::allowlist_function`], use regular expressions over function
276-
/// names. To match C++ methods, prefix the name of the type where they belong followed by an
277-
/// underscore. So if the type `Foo` has a method `bar`, it can be matched with the `Foo_bar`
276+
/// names. To match C++ methods, prefix the name of the type where they belong, followed by an
277+
/// underscore. So, if the type `Foo` has a method `bar`, it can be matched with the `Foo_bar`
278278
/// regular expression.
279279
///
280280
/// Additionally, Objective-C interfaces can be matched by prefixing the regular expression with
281-
/// `I`. For example, the `IFoo` regular expression matches the `Foo` interface and the `IFoo_foo`
281+
/// `I`. For example, the `IFoo` regular expression matches the `Foo` interface, and the `IFoo_foo`
282282
/// regular expression matches the `foo` method of the `Foo` interface.
283283
///
284284
/// Releases of `bindgen` with a version lesser or equal to `0.62.0` used to accept the wildcard
285-
/// pattern `*` as a valid regular expression. This behavior has been deprecated and the `.*`
285+
/// pattern `*` as a valid regular expression. This behavior has been deprecated, and the `.*`
286286
/// regular expression must be used instead.
287287
#[derive(Debug, Default, Clone)]
288288
pub struct Builder {

0 commit comments

Comments
 (0)