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

Commit

Permalink
Fixed macro issue outlined here: rust-lang/rust#34660 (comment)
Browse files Browse the repository at this point in the history
This is only a point release because of the minor change.

Also updated regex dependency which is also only a point change.
  • Loading branch information
whatisinternet committed Jul 27, 2016
1 parent 1de902a commit 365d0f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "Inflector"
version = "0.3.0"
version = "0.3.1"
authors = ["Josh Teeter<joshteeter@gmail.com>"]
exclude = [".travis.yml", ".gitignore"]
readme = "README.md"
Expand All @@ -20,5 +20,5 @@ name = "inflector"
path = "src/lib.rs"

[dependencies]
regex = "0.1.41"
regex = "0.1.73"
lazy_static = "0.2.1"
7 changes: 4 additions & 3 deletions src/string/pluralize/mod.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#![deny(warnings)]
use regex::Regex;
use string::constants::UNACCONTABLE_WORDS;

macro_rules! add_rule{
($r:ident, $rule:expr => $replace:expr) =>{
($r:ident, $rule:expr => $replace:expr) => {
$r.push((Regex::new($rule).unwrap(), $replace));
}
}

macro_rules! rules{
($r:ident; $($rule:expr => $replace:expr), *) =>{
($r:ident; $($rule:expr => $replace:expr), *) => {
$(
add_rule!($r, $rule => $replace)
add_rule!{$r, $rule => $replace}
)*
}
}
Expand Down

0 comments on commit 365d0f2

Please sign in to comment.