{"action":"opened","issue":{"url":"https://api.github.com/repos/maidsafe/crust/issues/736","repository_url":"https://api.github.com/repos/maidsafe/crust","labels_url":"https://api.github.com/repos/maidsafe/crust/issues/736/labels{/name}","comments_url":"https://api.github.com/repos/maidsafe/crust/issues/736/comments","events_url":"https://api.github.com/repos/maidsafe/crust/issues/736/events","html_url":"https://github.com/maidsafe/crust/issues/736","id":157634297,"number":736,"title":"Discussion - Usage of unwraps/expects etc in production","user":{"login":"ustulation","id":8788153,"avatar_url":"https://avatars.githubusercontent.com/u/8788153?v=3","gravatar_id":"","url":"https://api.github.com/users/ustulation","html_url":"https://github.com/ustulation","followers_url":"https://api.github.com/users/ustulation/followers","following_url":"https://api.github.com/users/ustulation/following{/other_user}","gists_url":"https://api.github.com/users/ustulation/gists{/gist_id}","starred_url":"https://api.github.com/users/ustulation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ustulation/subscriptions","organizations_url":"https://api.github.com/users/ustulation/orgs","repos_url":"https://api.github.com/users/ustulation/repos","events_url":"https://api.github.com/users/ustulation/events{/privacy}","received_events_url":"https://api.github.com/users/ustulation/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-31T10:01:32Z","updated_at":"2016-05-31T10:01:32Z","closed_at":null,"body":"This is mainly to formalise situations where we can and cannot use unwraps (or things that cause panic) in production (along with alternatives if any).\r\n\r\nThe cases where we tend to have unwraps\r\n1) locking a mutex\r\n2) spawning a thread\r\n3) joining a thread\r\n4) A logic like this -> You put something in a `Some()` right at construction and later do `take().unwrap()` because we know it will be a logical fallacy to have ​_None_​ there. A use case for this is: there are situations where we don't want to `clone` (or cannot `clone/copy`) an object and want to hand it to other. So you wrap it in an `Option::Some` and do a `take()` to move it out. Search for `option dance` idiom in rust."}}
{"actor":{"display_login":"ustulation"}}