Skip to content

Commit

Permalink
Change formatting in README.md example (#29)
Browse files Browse the repository at this point in the history
Closure parameters usually follow immediately after the opening
parenthesis for the called function.

Chained methods also (subjectively) look nicer when aligned.
  • Loading branch information
nvzqz authored and zbraniecki committed Oct 13, 2017
1 parent ecdf822 commit d42234b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ use fluent::MessageContext;
let ctx = MessageContext::new(&["en-US"]);
ctx.add_messages("hello-world = Hello, world!");

let value = ctx.get_message("hello-world").and_then(
|message| ctx.format(message, None),
);
let value = ctx.get_message("hello-world")
.and_then(|message| ctx.format(message, None));

assert_eq!(value, Some("Hello, world!".to_string()));
```
Expand Down

0 comments on commit d42234b

Please sign in to comment.