{"action":"created","issue":{"url":"https://api.github.com/repos/tomaka/vulkano/issues/524","repository_url":"https://api.github.com/repos/tomaka/vulkano","labels_url":"https://api.github.com/repos/tomaka/vulkano/issues/524/labels{/name}","comments_url":"https://api.github.com/repos/tomaka/vulkano/issues/524/comments","events_url":"https://api.github.com/repos/tomaka/vulkano/issues/524/events","html_url":"https://github.com/tomaka/vulkano/pull/524","id":236524515,"number":524,"title":"Panic when trying to create buffer from empty iterator","user":{"login":"GuildMasterInfinite","id":3010346,"avatar_url":"https://avatars1.githubusercontent.com/u/3010346?v=3","gravatar_id":"","url":"https://api.github.com/users/GuildMasterInfinite","html_url":"https://github.com/GuildMasterInfinite","followers_url":"https://api.github.com/users/GuildMasterInfinite/followers","following_url":"https://api.github.com/users/GuildMasterInfinite/following{/other_user}","gists_url":"https://api.github.com/users/GuildMasterInfinite/gists{/gist_id}","starred_url":"https://api.github.com/users/GuildMasterInfinite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuildMasterInfinite/subscriptions","organizations_url":"https://api.github.com/users/GuildMasterInfinite/orgs","repos_url":"https://api.github.com/users/GuildMasterInfinite/repos","events_url":"https://api.github.com/users/GuildMasterInfinite/events{/privacy}","received_events_url":"https://api.github.com/users/GuildMasterInfinite/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-06-16T15:57:09Z","updated_at":"2017-06-19T18:58:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tomaka/vulkano/pulls/524","html_url":"https://github.com/tomaka/vulkano/pull/524","diff_url":"https://github.com/tomaka/vulkano/pull/524.diff","patch_url":"https://github.com/tomaka/vulkano/pull/524.patch"},"body":"This fixes #367, by adding an assertion with a proper error message in case the iterator is empty. Also added the potential `panic!` to the corresponding documentation section."},"comment":{"url":"https://api.github.com/repos/tomaka/vulkano/issues/comments/309534207","html_url":"https://github.com/tomaka/vulkano/pull/524#issuecomment-309534207","issue_url":"https://api.github.com/repos/tomaka/vulkano/issues/524","id":309534207,"user":{"login":"GuildMasterInfinite","id":3010346,"avatar_url":"https://avatars1.githubusercontent.com/u/3010346?v=3","gravatar_id":"","url":"https://api.github.com/users/GuildMasterInfinite","html_url":"https://github.com/GuildMasterInfinite","followers_url":"https://api.github.com/users/GuildMasterInfinite/followers","following_url":"https://api.github.com/users/GuildMasterInfinite/following{/other_user}","gists_url":"https://api.github.com/users/GuildMasterInfinite/gists{/gist_id}","starred_url":"https://api.github.com/users/GuildMasterInfinite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuildMasterInfinite/subscriptions","organizations_url":"https://api.github.com/users/GuildMasterInfinite/orgs","repos_url":"https://api.github.com/users/GuildMasterInfinite/repos","events_url":"https://api.github.com/users/GuildMasterInfinite/events{/privacy}","received_events_url":"https://api.github.com/users/GuildMasterInfinite/received_events","type":"User","site_admin":false},"created_at":"2017-06-19T18:58:02Z","updated_at":"2017-06-19T18:58:02Z","body":"I ran this test for the CpuAccessibleBuffer and it didn't crash.\r\n\r\n```rust\r\n\r\n#[cfg(test)]\r\nmod tests {\r\n    use buffer::{CpuAccessibleBuffer, BufferUsage};\r\n\r\n    #[test]\r\n    fn create_empty_buffer() {\r\n        let (device, queue) = gfx_dev_and_queue!();\r\n\r\n        const EMPTY: [i32; 0] = [];\r\n\r\n        CpuAccessibleBuffer::from_data(device, BufferUsage::all(), Some(queue.family()), EMPTY.iter());\r\n    }\r\n}\r\n```"}}
{"actor":{"display_login":"GuildMasterInfinite"}}