Skip to content

Commit

Permalink
Fix the FluentValue::into_number rename in examples and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zibi Braniecki committed Feb 21, 2019
1 parent 1f2e1e9 commit 3f08357
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fluent-bundle/examples/external_arguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ unread-emails =
}

let mut args = HashMap::new();
args.insert("emailCount", FluentValue::as_number("1.0").unwrap());
args.insert("emailCount", FluentValue::into_number("1.0").unwrap());

match bundle.format("unread-emails", Some(&args)) {
Some((value, _)) => println!("{}", value),
Expand Down
2 changes: 1 addition & 1 deletion fluent-bundle/tests/resolve_external_argument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ unread-emails-dec = You have { $emailsCountDec } unread emails.

let mut args = HashMap::new();
args.insert("emailsCount", FluentValue::from(5));
args.insert("emailsCountDec", FluentValue::as_number("5.0").unwrap());
args.insert("emailsCountDec", FluentValue::into_number("5.0").unwrap());

assert_format_no_errors(
bundle.format("unread-emails", Some(&args)),
Expand Down
4 changes: 2 additions & 2 deletions fluent-bundle/tests/resolve_plural_rule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ unread-emails-dec =

let mut args = HashMap::new();
args.insert("emailsCount", FluentValue::from(1));
args.insert("emailsCountDec", FluentValue::as_number("1.0").unwrap());
args.insert("emailsCountDec", FluentValue::into_number("1.0").unwrap());

assert_format_no_errors(
bundle.format("unread-emails", Some(&args)),
Expand Down Expand Up @@ -64,7 +64,7 @@ unread-emails-dec =

let mut args = HashMap::new();
args.insert("emailsCount", FluentValue::from(1));
args.insert("emailsCountDec", FluentValue::as_number("1.0").unwrap());
args.insert("emailsCountDec", FluentValue::into_number("1.0").unwrap());

assert_format_no_errors(
bundle.format("unread-emails", Some(&args)),
Expand Down

0 comments on commit 3f08357

Please sign in to comment.