{"action":"created","issue":{"url":"https://api.github.com/repos/Chiel92/vim-autoformat/issues/118","repository_url":"https://api.github.com/repos/Chiel92/vim-autoformat","labels_url":"https://api.github.com/repos/Chiel92/vim-autoformat/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/Chiel92/vim-autoformat/issues/118/comments","events_url":"https://api.github.com/repos/Chiel92/vim-autoformat/issues/118/events","html_url":"https://github.com/Chiel92/vim-autoformat/issues/118","id":138630314,"number":118,"title":"Rust formatter seems to be broken","user":{"login":"dead10ck","id":846275,"avatar_url":"https://avatars.githubusercontent.com/u/846275?v=3","gravatar_id":"","url":"https://api.github.com/users/dead10ck","html_url":"https://github.com/dead10ck","followers_url":"https://api.github.com/users/dead10ck/followers","following_url":"https://api.github.com/users/dead10ck/following{/other_user}","gists_url":"https://api.github.com/users/dead10ck/gists{/gist_id}","starred_url":"https://api.github.com/users/dead10ck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dead10ck/subscriptions","organizations_url":"https://api.github.com/users/dead10ck/orgs","repos_url":"https://api.github.com/users/dead10ck/repos","events_url":"https://api.github.com/users/dead10ck/events{/privacy}","received_events_url":"https://api.github.com/users/dead10ck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-03-05T01:27:10Z","updated_at":"2016-03-10T16:22:52Z","closed_at":null,"body":"I have this file, which was formatted with `cargo fmt`:\r\n\r\n```rust\r\nextern crate kafka;\r\n\r\nmod event;\r\n\r\nuse std::str;\r\nuse kafka::consumer::{Consumer, FetchOffset};\r\nuse event::Event;\r\n\r\nfn main() {\r\n    let mut consumer = Consumer::from_hosts(vec![\"docker:9092\".to_owned()],\r\n                                            \"my-group\".to_owned(),\r\n                                            \"threatgrid\".to_owned())\r\n                           .with_fallback_offset(FetchOffset::Earliest)\r\n                           .create()\r\n                           .unwrap();\r\n\r\n    loop {\r\n        for message_set in consumer.poll().unwrap().iter() {\r\n            for m in message_set.messages() {\r\n                // let bytes = Vec::from(m.value);\r\n                // let mut message_string = String::from_utf8(bytes).unwrap();\r\n                let msg_str = str::from_utf8(m.value).unwrap();\r\n                println!(\"{}\", msg_str);\r\n            }\r\n            // consumer.consume_messageset(message_set);\r\n        }\r\n        // consumer.commit_consumed().expect(\"Failed to commit consumed messages\");\r\n    }\r\n}\r\n\r\n```\r\n\r\nBut when I run `:Autoformat` on it, it seems to mess up the indentation on the `Consumer` line:\r\n\r\n```rust\r\nfn main() {\r\n    let mut consumer = Consumer::from_hosts(vec![\"docker:9092\".to_owned()],\r\n    \"my-group\".to_owned(),\r\n    \"threatgrid\".to_owned())\r\n        .with_fallback_offset(FetchOffset::Earliest)\r\n        .create()\r\n        .unwrap();\r\n    ...\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/Chiel92/vim-autoformat/issues/comments/194933418","html_url":"https://github.com/Chiel92/vim-autoformat/issues/118#issuecomment-194933418","issue_url":"https://api.github.com/repos/Chiel92/vim-autoformat/issues/118","id":194933418,"user":{"login":"Chiel92","id":1030961,"avatar_url":"https://avatars.githubusercontent.com/u/1030961?v=3","gravatar_id":"","url":"https://api.github.com/users/Chiel92","html_url":"https://github.com/Chiel92","followers_url":"https://api.github.com/users/Chiel92/followers","following_url":"https://api.github.com/users/Chiel92/following{/other_user}","gists_url":"https://api.github.com/users/Chiel92/gists{/gist_id}","starred_url":"https://api.github.com/users/Chiel92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chiel92/subscriptions","organizations_url":"https://api.github.com/users/Chiel92/orgs","repos_url":"https://api.github.com/users/Chiel92/repos","events_url":"https://api.github.com/users/Chiel92/events{/privacy}","received_events_url":"https://api.github.com/users/Chiel92/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T16:22:52Z","updated_at":"2016-03-10T16:22:52Z","body":"Okay, I find that really weird. When running rustfmt from the command line, does it matter from which working directory you run it?"}}