{"action":"created","issue":{"url":"https://api.github.com/repos/phildawes/racer/issues/469","labels_url":"https://api.github.com/repos/phildawes/racer/issues/469/labels{/name}","comments_url":"https://api.github.com/repos/phildawes/racer/issues/469/comments","events_url":"https://api.github.com/repos/phildawes/racer/issues/469/events","html_url":"https://github.com/phildawes/racer/pull/469","id":126001964,"number":469,"title":"Read packages source when library name is different from package name","user":{"login":"jaxx","id":723258,"avatar_url":"https://avatars.githubusercontent.com/u/723258?v=3","gravatar_id":"","url":"https://api.github.com/users/jaxx","html_url":"https://github.com/jaxx","followers_url":"https://api.github.com/users/jaxx/followers","following_url":"https://api.github.com/users/jaxx/following{/other_user}","gists_url":"https://api.github.com/users/jaxx/gists{/gist_id}","starred_url":"https://api.github.com/users/jaxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaxx/subscriptions","organizations_url":"https://api.github.com/users/jaxx/orgs","repos_url":"https://api.github.com/users/jaxx/repos","events_url":"https://api.github.com/users/jaxx/events{/privacy}","received_events_url":"https://api.github.com/users/jaxx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-11T18:02:39Z","updated_at":"2016-01-13T21:04:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/phildawes/racer/pulls/469","html_url":"https://github.com/phildawes/racer/pull/469","diff_url":"https://github.com/phildawes/racer/pull/469.diff","patch_url":"https://github.com/phildawes/racer/pull/469.patch"},"body":"I tried to fix issue #449. Earlier Racer found package source when crate name was exactly the same as package name - for example if package name was ```rand``` and crate name was ```rand``` then it could navigate to the package source. If package name was ```rust-crypto```, but crate name was ```crypto``` then it couldn't find nothing. So now I made few changes:\r\n\r\n1. Racer always iterates over all packages\r\n2. Then finds packages Cargo.toml files\r\n3. Reads package name from toml file (if lib section is present then this comes from lib, else from package section)\r\n\r\nI'm kind of a Rust noob, so I think there's a lot room for optimizing this stuff (for example cache those packages in session etc). Also wanted to ask if there's a way to test this?"},"comment":{"url":"https://api.github.com/repos/phildawes/racer/issues/comments/171431964","html_url":"https://github.com/phildawes/racer/pull/469#issuecomment-171431964","issue_url":"https://api.github.com/repos/phildawes/racer/issues/469","id":171431964,"user":{"login":"jaxx","id":723258,"avatar_url":"https://avatars.githubusercontent.com/u/723258?v=3","gravatar_id":"","url":"https://api.github.com/users/jaxx","html_url":"https://github.com/jaxx","followers_url":"https://api.github.com/users/jaxx/followers","following_url":"https://api.github.com/users/jaxx/following{/other_user}","gists_url":"https://api.github.com/users/jaxx/gists{/gist_id}","starred_url":"https://api.github.com/users/jaxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaxx/subscriptions","organizations_url":"https://api.github.com/users/jaxx/orgs","repos_url":"https://api.github.com/users/jaxx/repos","events_url":"https://api.github.com/users/jaxx/events{/privacy}","received_events_url":"https://api.github.com/users/jaxx/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T21:04:30Z","updated_at":"2016-01-13T21:04:30Z","body":"added few tests :)"}}