GitHub PushEvent at 2014-04-15 13:37:01
Repository: rust
Actor: alexcrichton
Payload: {"shas":[["545d4718c8e1b9e69474165a1cb38d873627183d","60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","std: Make std::comm return types consistent\n\nThere are currently a number of return values from the std::comm methods, not\nall of which are necessarily completely expressive:\n\n  Sender::try_send(t: T) -> bool\n    This method currently doesn't transmit back the data `t` if the send fails\n    due to the other end having disconnected. Additionally, this shares the name\n    of the synchronous try_send method, but it differs in semantics in that it\n    only has one failure case, not two (the buffer can never be full).\n\n  SyncSender::try_send(t: T) -> TrySendResult<T>\n    This method accurately conveys all possible information, but it uses a\n    custom type to the std::comm module with no convenience methods on it.\n    Additionally, if you want to inspect the result you're forced to import\n    something from `std::comm`.\n\n  SyncSender::send_opt(t: T) -> Option<T>\n    This method uses Some(T) as an \"error value\" and None as a \"success value\",\n    but almost all other uses of Option<T> have Some/None the other way\n\n  Receiver::try_recv(t: T) -> TryRecvResult<T>\n    Similarly to the synchronous try_send, this custom return type is lacking in\n    terms of usability (no convenience methods).\n\nWith this number of drawbacks in mind, I believed it was time to re-work the\nreturn types of these methods. The new API for the comm module is:\n\n  Sender::send(t: T) -> ()\n  Sender::send_opt(t: T) -> Result<(), T>\n  SyncSender::send(t: T) -> ()\n  SyncSender::send_opt(t: T) -> Result<(), T>\n  SyncSender::try_send(t: T) -> Result<(), TrySendError<T>>\n  Receiver::recv() -> T\n  Receiver::recv_opt() -> Result<T, ()>\n  Receiver::try_recv() -> Result<T, TryRecvError>\n\nThe notable changes made are:\n\n* Sender::try_send => Sender::send_opt. This renaming brings the semantics in\n  line with the SyncSender::send_opt method. An asychronous send only has one\n  failure case, unlike the synchronous try_send method which has two failure\n  cases (full/disconnected).\n\n* Sender::send_opt returns the data back to the caller if the send is guaranteed\n  to fail. This method previously returned `bool`, but then it was unable to\n  retrieve the data if the data was guaranteed to fail to send. There is still a\n  race such that when `Ok(())` is returned the data could still fail to be\n  received, but that's inherent to an asynchronous channel.\n\n* Result is now the basis of all return values. This not only adds lots of\n  convenience methods to all return values for free, but it also means that you\n  can inspect the return values with no extra imports (Ok/Err are in the\n  prelude). Additionally, it's now self documenting when something failed or not\n  because the return value has \"Err\" in the name.\n\nThings I'm a little uneasy about:\n\n* The methods send_opt and recv_opt are not returning options, but rather\n  results. I felt more strongly that Option was the wrong return type than the\n  _opt prefix was wrong, and I coudn't think of a much better name for these\n  methods. One possible way to think about them is to read the _opt suffix as\n  \"optionally\".\n\n* Result<T, ()> is often better expressed as Option<T>. This is only applicable\n  to the recv_opt() method, but I thought it would be more consistent for\n  everything to return Result rather than one method returning an Option.\n\nDespite my two reasons to feel uneasy, I feel much better about the consistency\nin return values at this point, and I think the only real open question is if\nthere's a better suffix for {send,recv}_opt.\n\nCloses #11527","Alex Crichton",false],["408f484b660d507617d5293c03942b5b5dd7bc0a","19513e5f3d298c7a6611c44f0bf76cabc0057ae4@gmail.com","libtest: rename `BenchHarness` to `Bencher`\nCloses #12640","Liigo Zhuang",false],["5b109a175459e6428dafdd6aa5bedc6f598a3dff","19e794c1bad8f0914a9eb04e9876660727aa8f3b@gmail.com","Add more type signatures to the docs; tweak a few of them.\n\nSomeone reading the docs won't know what the types of various things\nare, so this adds them in a few meaningful places to help with\ncomprehension.\n\ncc #13423.","Huon Wilson",false],["b945573e299e1e8b9d24759bb447d9bd1e88ec82","cca99684d893888d01a53127bf515d97ac84478d@exyr.org","liblog doc: Fix apparent search-and-replace errors","Simon Sapin",false],["0ac532686f0134d28602fdb01d7fe128bc2f498e","7b617481dc67255f8ac089bf33cb7fadcdc5dda1@gmail.com","syntax: remove ast::Sigil.","Eduard Burtescu",false],["9351c01b3576f32206b80b32a03b66be66f18b39","7b617481dc67255f8ac089bf33cb7fadcdc5dda1@gmail.com","rustdoc: fix fallout from removing ast::Sigil.","Eduard Burtescu",false],["402d946868c4d775eebd29b4e13d3897f5cc2d47","7b617481dc67255f8ac089bf33cb7fadcdc5dda1@gmail.com","rustc: fix fallout from removing ast::Sigil and use ty::TraitStore in ty::ClosureTy.","Eduard Burtescu",false],["f0c0c2ae91061a2b6041658a6e406c757e4e5483","7b617481dc67255f8ac089bf33cb7fadcdc5dda1@gmail.com","rustc: remove proc -> once || coercions.","Eduard Burtescu",false],["9d570ad8c16970e1b2f629d224716f2d7a8b7820","7b617481dc67255f8ac089bf33cb7fadcdc5dda1@gmail.com","rustc: remove the last mentions of @fn.","Eduard Burtescu",false],["8b6091e8f1f5531fe907f84b6a2b27af04a95e8f","3a2c29237f73c7cf88424b80e427b1884f346b35@rust-lang.org","auto merge of #13236 : liigo/rust/rename-benchharness, r=huonw\n\nCloses #12640\r\n\r\nbased on PR #13030, rebased, and passed all tests.","bors",false],["c60d9ad57c1d409a0737838eefe82da0eeb9a9ec","60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","mk: Fix rpath on cross compile builds\n\nAfter removing absolute rpaths, cross compile builds (notably the nightly\nbuilders) broke. This is because the RPATH was pointing at an empty directory\nbecause only the rustc binary is copied over, not all of the target libraries.\nThis modifies the cross compile logic to fixup the rpath of the stage0\ncross-compiled rustc to point to where it came from.","Alex Crichton",false],["b7e93067732ac1398a74958a3b1b0f6fa72fee8d","3a2c29237f73c7cf88424b80e427b1884f346b35@rust-lang.org","auto merge of #13458 : huonw/rust/doc-signatures, r=alexcrichton\n\nAdd more type signatures to the docs; tweak a few of them.\r\n\r\nSomeone reading the docs won't know what the types of various things\r\nare, so this adds them in a few meaningful places to help with\r\ncomprehension.\r\n\r\ncc #13423.","bors",false],["e6072fa0c4c22d62acf3dcb78c8ee260a1368bd7","60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","rustc: Deterministically link upstream C libraries\n\nPreviously, upstream C libraries were linked in a nondeterministic fashion\nbecause they were collected through iter_crate_data() which is a nodeterministic\ntraversal of a hash map. When upstream rlibs had interdependencies among their\nnative libraries (such as libfoo depending on libc), then the ordering would\noccasionally be wrong, causing linkage to fail.\n\nThis uses the topologically sorted list of libraries to collect native\nlibraries, so if a native library depends on libc it just needs to make sure\nthat the rust crate depends on liblibc.","Alex Crichton",false],["d1e20488a5d1258b1582caa2db77e5210b8bd28f","7b3ae16b13baf2c98b283b3d77c80865a6e39eeb@gmail.com","Parameterize contains_nul for BytesContainer.","Kevin Butler",false],["9b9ad9b741bcab9669b9a64dd8004382290dfa47","7b3ae16b13baf2c98b283b3d77c80865a6e39eeb@gmail.com","Simplify GenericPath::set_extension.","Kevin Butler",false],["ecc774f788ca3880ce76e4b87ac0d21a3a16d3ae","3a2c29237f73c7cf88424b80e427b1884f346b35@rust-lang.org","auto merge of #13395 : Ryman/rust/bytecontainer_impl_container, r=alexcrichton\n\nAlso some minor cleanup in Path related to this.","bors",false],["7a82d478a3c9301eda4453ec222842f750e13630","60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","std: Fix iteration over vectors of 0-size values\n\nPreviously, all slices derived from a vector whose values were of size 0 had a\nnull pointer as the 'data' pointer on the slice. This caused first pointer to be\nyielded during iteration to always be the null pointer. Due to the null pointer\noptimization, this meant that the first return value was None, instead of\nSome(&T).\n\nThis commit changes slice construction from a Vec instance to use a base pointer\nof 1 if the values have zero size. This means that the iterator will never\nreturn null, and the iteration will proceed appropriately.\n\nCloses #13467","Alex Crichton",false],["e011939b1af554d2a29947feb66f01e27a2a1524","ffbcc695a1ffccd9c63cb1f8bda5fe8d25efe036@mozilla.com","Implement Char::encode_utf16\n\nAnd clean up encode_utf8 a bit.","Keegan McAllister",false],["58fc85db93bf6c73c4da957db8c6b8b025826e93","ffbcc695a1ffccd9c63cb1f8bda5fe8d25efe036@mozilla.com","Add tests for Char::encode_utf{8,16}","Keegan McAllister",false],["cee9a83629336fa3ae218d2876fa9395a68d4370","ffbcc695a1ffccd9c63cb1f8bda5fe8d25efe036@mozilla.com","Decode non-BMP hex escapes in JSON\n\nFixes #13064.","Keegan McAllister",false]],"size":60,"ref":"refs/heads/try","head":"706d268d96ba419a0f129b54a6f07bfa032ed32c"}