]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/useless_conversion.fixed
Merge commit 'da5a6fb1b65ec6581a67e942a3850f6bc15a552c' into clippyup
[rust.git] / src / tools / clippy / tests / ui / useless_conversion.fixed
index fdd4bc581f305a21281c8d6da8e642cc54dbf455..813cdaecaa91a8864f8f285a8f3c3130c0cb5bc4 100644 (file)
@@ -32,11 +32,20 @@ fn test_issue_3913() -> Result<(), std::io::Error> {
     Ok(())
 }
 
+fn test_issue_5833() -> Result<(), ()> {
+    let text = "foo\r\nbar\n\nbaz\n";
+    let lines = text.lines();
+    if Some("ok") == lines.into_iter().next() {}
+
+    Ok(())
+}
+
 fn main() {
     test_generic(10i32);
     test_generic2::<i32, i32>(10i32);
     test_questionmark().unwrap();
     test_issue_3913().unwrap();
+    test_issue_5833().unwrap();
 
     let _: String = "foo".into();
     let _: String = From::from("foo");