{"$message_type":"diagnostic","message":"unreachable statement","code":{"code":"unreachable_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\main.rs","byte_start":1517,"byte_end":1576,"line_start":47,"line_end":47,"column_start":9,"column_end":68,"is_primary":true,"text":[{"text":"        pd.write(CMD_ESCAPE).expect(\"Failed to write to Playdate\");","highlight_start":9,"highlight_end":68}],"label":"unreachable statement","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src\\main.rs","byte_start":979,"byte_end":1508,"line_start":32,"line_end":46,"column_start":9,"column_end":10,"is_primary":false,"text":[{"text":"        loop {","highlight_start":9,"highlight_end":15},{"text":"            // exhaust the buffer and combine it into a single string","highlight_start":1,"highlight_end":70},{"text":"            let mut buf = [0; 1024];","highlight_start":1,"highlight_end":37},{"text":"            let mut output = String::new();","highlight_start":1,"highlight_end":44},{"text":"            while let Ok(n) = pd.read(&mut buf) {","highlight_start":1,"highlight_end":50},{"text":"                if n == 0 {","highlight_start":1,"highlight_end":28},{"text":"                    break;","highlight_start":1,"highlight_end":27},{"text":"                }","highlight_start":1,"highlight_end":18},{"text":"                output.push_str(&String::from_utf8_lossy(&buf[..n]));","highlight_start":1,"highlight_end":70},{"text":"            }","highlight_start":1,"highlight_end":14},{"text":"            if !output.is_empty() {","highlight_start":1,"highlight_end":36},{"text":"                print!(\"{output}\");","highlight_start":1,"highlight_end":36},{"text":"            }","highlight_start":1,"highlight_end":14},{"text":"            std::thread::sleep(std::time::Duration::from_millis(1));","highlight_start":1,"highlight_end":69},{"text":"        }","highlight_start":1,"highlight_end":10}],"label":"any code following this expression is unreachable","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[93mwarning\u001b[0m\u001b[1m\u001b[97m: unreachable statement\u001b[0m\n  \u001b[1m\u001b[96m--> \u001b[0msrc\\main.rs:47:9\n   \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m32\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[96m/\u001b[0m         loop {\n\u001b[1m\u001b[96m33\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[96m|\u001b[0m             // exhaust the buffer and combine it into a single string\n\u001b[1m\u001b[96m34\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[96m|\u001b[0m             let mut buf = [0; 1024];\n\u001b[1m\u001b[96m35\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[96m|\u001b[0m             let mut output = String::new();\n\u001b[1m\u001b[96m...\u001b[0m  \u001b[1m\u001b[96m|\u001b[0m\n\u001b[1m\u001b[96m45\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[96m|\u001b[0m             std::thread::sleep(std::time::Duration::from_millis(1));\n\u001b[1m\u001b[96m46\u001b[0m \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[96m|\u001b[0m         }\n   \u001b[1m\u001b[96m|\u001b[0m \u001b[1m\u001b[96m|_________-\u001b[0m \u001b[1m\u001b[96many code following this expression is unreachable\u001b[0m\n\u001b[1m\u001b[96m47\u001b[0m \u001b[1m\u001b[96m|\u001b[0m           pd.write(CMD_ESCAPE).expect(\"Failed to write to Playdate\");\n   \u001b[1m\u001b[96m|\u001b[0m           \u001b[1m\u001b[93m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[93munreachable statement\u001b[0m\n   \u001b[1m\u001b[96m|\u001b[0m\n   \u001b[1m\u001b[96m= \u001b[0m\u001b[1m\u001b[97mnote\u001b[0m: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default\n\n"}
{"$message_type":"diagnostic","message":"1 warning emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[1m\u001b[93mwarning\u001b[0m\u001b[1m\u001b[97m: 1 warning emitted\u001b[0m\n\n"}
