Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit 365d0f2

Browse files
Fixed macro issue outlined here: rust-lang/rust#34660 (comment)
This is only a point release because of the minor change. Also updated regex dependency which is also only a point change.
1 parent 1de902a commit 365d0f2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "Inflector"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
authors = ["Josh Teeter<joshteeter@gmail.com>"]
55
exclude = [".travis.yml", ".gitignore"]
66
readme = "README.md"
@@ -20,5 +20,5 @@ name = "inflector"
2020
path = "src/lib.rs"
2121

2222
[dependencies]
23-
regex = "0.1.41"
23+
regex = "0.1.73"
2424
lazy_static = "0.2.1"

src/string/pluralize/mod.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
#![deny(warnings)]
12
use regex::Regex;
23
use string::constants::UNACCONTABLE_WORDS;
34

45
macro_rules! add_rule{
5-
($r:ident, $rule:expr => $replace:expr) =>{
6+
($r:ident, $rule:expr => $replace:expr) => {
67
$r.push((Regex::new($rule).unwrap(), $replace));
78
}
89
}
910

1011
macro_rules! rules{
11-
($r:ident; $($rule:expr => $replace:expr), *) =>{
12+
($r:ident; $($rule:expr => $replace:expr), *) => {
1213
$(
13-
add_rule!($r, $rule => $replace)
14+
add_rule!{$r, $rule => $replace}
1415
)*
1516
}
1617
}

0 commit comments

Comments
 (0)