Skip to content

Instantly share code, notes, and snippets.

@db48x
Created March 16, 2012 03:57
Show Gist options
  • Save db48x/2048452 to your computer and use it in GitHub Desktop.
Save db48x/2048452 to your computer and use it in GitHub Desktop.
win
- for line in str::split_char(p.err, '\n') {
- if line == res {
- ret true;
- }
- }
- ret false;
+ ret iter::any(str::by_lines(p.err)) {|&&line| line == res };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment