{"message":"returning the result of a `let` binding from a block","code":{"code":"clippy::let_and_return","explanation":null},"level":"warning","spans":[{"file_name":"src/util.rs","byte_start":428,"byte_end":542,"line_start":12,"line_end":12,"column_start":5,"column_end":119,"is_primary":false,"text":[{"text":" let seg_dense_config = parse(&json_str).unwrap_or_else(|_| panic!(\"Unable to parse segdense file {}\", file_name));","highlight_start":5,"highlight_end":119}],"label":"unnecessary `let` binding","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/util.rs","byte_start":547,"byte_end":563,"line_start":13,"line_end":13,"column_start":5,"column_end":21,"is_primary":true,"text":[{"text":" seg_dense_config","highlight_start":5,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(clippy::let_and_return)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"return the expression directly","code":null,"level":"help","spans":[{"file_name":"src/util.rs","byte_start":428,"byte_end":542,"line_start":12,"line_end":12,"column_start":5,"column_end":119,"is_primary":true,"text":[{"text":" let seg_dense_config = parse(&json_str).unwrap_or_else(|_| panic!(\"Unable to parse segdense file {}\", file_name));","highlight_start":5,"highlight_end":119}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"src/util.rs","byte_start":547,"byte_end":563,"line_start":13,"line_end":13,"column_start":5,"column_end":21,"is_primary":true,"text":[{"text":" seg_dense_config","highlight_start":5,"highlight_end":21}],"label":null,"suggested_replacement":"parse(&json_str).unwrap_or_else(|_| panic!(\"Unable to parse segdense file {}\", file_name))","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: returning the result of a `let` binding from a block\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/util.rs:13:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m12\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let seg_dense_config = parse(&json_str).unwrap_or_else(|_| panic!(\"Unable to parse segdense file {}\", file_name));\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m------------------------------------------------------------------------------------------------------------------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12munnecessary `let` binding\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m13\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m seg_dense_config\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(clippy::let_and_return)]` on by default\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14mhelp\u001b[0m\u001b[0m: return the expression directly\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m12\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m~ \u001b[0m\u001b[0m \u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m13\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m~ \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10mparse(&json_str).unwrap_or_else(|_| panic!(\"Unable to parse segdense file {}\", file_name))\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\n"} {"message":"you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`","code":{"code":"clippy::single_match","explanation":null},"level":"warning","spans":[{"file_name":"src/util.rs","byte_start":2832,"byte_end":3008,"line_start":83,"line_end":89,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" match feature_info {","highlight_start":9,"highlight_end":29},{"text":" Some(info) => {","highlight_start":1,"highlight_end":28},{"text":" debug!(\"{:?}\", info);","highlight_start":1,"highlight_end":38},{"text":" fm.set(feature_id, info)","highlight_start":1,"highlight_end":41},{"text":" },","highlight_start":1,"highlight_end":15},{"text":" None => (),","highlight_start":1,"highlight_end":24},{"text":" }","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(clippy::single_match)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try this","code":null,"level":"help","spans":[{"file_name":"src/util.rs","byte_start":2832,"byte_end":3008,"line_start":83,"line_end":89,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" match feature_info {","highlight_start":9,"highlight_end":29},{"text":" Some(info) => {","highlight_start":1,"highlight_end":28},{"text":" debug!(\"{:?}\", info);","highlight_start":1,"highlight_end":38},{"text":" fm.set(feature_id, info)","highlight_start":1,"highlight_end":41},{"text":" },","highlight_start":1,"highlight_end":15},{"text":" None => (),","highlight_start":1,"highlight_end":24},{"text":" }","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":"if let Some(info) = feature_info {\n debug!(\"{:?}\", info);\n fm.set(feature_id, info)\n }","suggestion_applicability":"HasPlaceholders","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/util.rs:83:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m83\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m/\u001b[0m\u001b[0m \u001b[0m\u001b[0m match feature_info {\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m84\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Some(info) => {\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m85\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m debug!(\"{:?}\", info);\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m86\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m fm.set(feature_id, info)\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m87\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m },\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m88\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m None => (),\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m89\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m }\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[33m|_________^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(clippy::single_match)]` on by default\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14mhelp\u001b[0m\u001b[0m: try this\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m83\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m~ \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10mif let Some(info) = feature_info {\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m84\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+ debug!(\"{:?}\", info);\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m85\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+ fm.set(feature_id, info)\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m86\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+ }\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\n"} {"message":"writing `&Vec` instead of `&[_]` involves a new object where a slice will do","code":{"code":"clippy::ptr_arg","explanation":null},"level":"warning","spans":[{"file_name":"src/util.rs","byte_start":3131,"byte_end":3149,"line_start":95,"line_end":95,"column_start":83,"column_end":101,"is_primary":true,"text":[{"text":"fn add_feature_info_to_mapper(feature_mapper: &mut FeatureMapper, input_features: &Vec) {","highlight_start":83,"highlight_end":101}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(clippy::ptr_arg)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"change this to","code":null,"level":"help","spans":[{"file_name":"src/util.rs","byte_start":3131,"byte_end":3149,"line_start":95,"line_end":95,"column_start":83,"column_end":101,"is_primary":true,"text":[{"text":"fn add_feature_info_to_mapper(feature_mapper: &mut FeatureMapper, input_features: &Vec) {","highlight_start":83,"highlight_end":101}],"label":null,"suggested_replacement":"&[InputFeature]","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: writing `&Vec` instead of `&[_]` involves a new object where a slice will do\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/util.rs:95:83\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m95\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn add_feature_info_to_mapper(feature_mapper: &mut FeatureMapper, input_features: &Vec) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: change this to: `&[InputFeature]`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(clippy::ptr_arg)]` on by default\u001b[0m\n\n"} {"message":"you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`","code":{"code":"clippy::single_match","explanation":null},"level":"warning","spans":[{"file_name":"src/util.rs","byte_start":3337,"byte_end":3549,"line_start":100,"line_end":106,"column_start":13,"column_end":14,"is_primary":true,"text":[{"text":" match feature_info {","highlight_start":13,"highlight_end":33},{"text":" Some(info) => {","highlight_start":1,"highlight_end":32},{"text":" debug!(\"{:?}\", info);","highlight_start":1,"highlight_end":42},{"text":" feature_mapper.set(feature_id, info)","highlight_start":1,"highlight_end":57},{"text":" },","highlight_start":1,"highlight_end":19},{"text":" None => (),","highlight_start":1,"highlight_end":28},{"text":" }","highlight_start":1,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"try this","code":null,"level":"help","spans":[{"file_name":"src/util.rs","byte_start":3337,"byte_end":3549,"line_start":100,"line_end":106,"column_start":13,"column_end":14,"is_primary":true,"text":[{"text":" match feature_info {","highlight_start":13,"highlight_end":33},{"text":" Some(info) => {","highlight_start":1,"highlight_end":32},{"text":" debug!(\"{:?}\", info);","highlight_start":1,"highlight_end":42},{"text":" feature_mapper.set(feature_id, info)","highlight_start":1,"highlight_end":57},{"text":" },","highlight_start":1,"highlight_end":19},{"text":" None => (),","highlight_start":1,"highlight_end":28},{"text":" }","highlight_start":1,"highlight_end":14}],"label":null,"suggested_replacement":"if let Some(info) = feature_info {\n debug!(\"{:?}\", info);\n feature_mapper.set(feature_id, info)\n }","suggestion_applicability":"HasPlaceholders","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/util.rs:100:13\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m100\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m/\u001b[0m\u001b[0m \u001b[0m\u001b[0m match feature_info {\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m101\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Some(info) => {\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m102\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m debug!(\"{:?}\", info);\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m103\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m feature_mapper.set(feature_id, info)\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m104\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m },\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m105\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m None => (),\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m106\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m }\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[33m|_____________^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14mhelp\u001b[0m\u001b[0m: try this\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m100\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m~ \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10mif let Some(info) = feature_info {\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m101\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+ debug!(\"{:?}\", info);\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m102\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+ feature_mapper.set(feature_id, info)\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m103\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+ }\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\n"} {"message":"4 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 4 warnings emitted\u001b[0m\n\n"}