Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle unicode chars in closures #3632

Merged
merged 1 commit into from
Jun 16, 2019
Merged

Conversation

scampi
Copy link
Contributor

@scampi scampi commented Jun 16, 2019

The NotUnicode branch was unnecessarily put on a new line, although it
was within max width:

 fn baz() {
     let our_error_b = result_b_from_func.or_else(|e| match e {
         NotPresent => Err(e).chain_err(|| "env var wasn't provided"),
-        NotUnicode(_) => Err(e).chain_err(|| "env var was very very very bork文字化ã"),
+        NotUnicode(_) => {
+            Err(e).chain_err(|| "env var was very very very bork文字化ã")
+        }
     });
 }

Related to #6

The `NotUnicode` branch was unecessarily put on a new line, although it
was within max width:

```diff
 fn baz() {
     let our_error_b = result_b_from_func.or_else(|e| match e {
         NotPresent => Err(e).chain_err(|| "env var wasn't provided"),
-        NotUnicode(_) => Err(e).chain_err(|| "env var was very very very bork文字化ã"),
+        NotUnicode(_) => {
+            Err(e).chain_err(|| "env var was very very very bork文字化ã")
+        }
     });
 }
```
Copy link
Contributor

@topecongiro topecongiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants