Alex Crichton
ab92ea526d
std: Modernize the local_data api
...
This commit brings the local_data api up to modern rust standards with a few key
improvements:
* The `pop` and `set` methods have been combined into one method, `replace`
* The `get_mut` method has been removed. All interior mutability should be done
through `RefCell`.
* All functionality is now exposed as a method on the keys themselves. Instead
of importing std::local_data, you now use "key.replace()" and "key.get()".
* All closures have been removed in favor of RAII functionality. This means that
get() and get_mut() no long require closures, but rather return
Option<SmartPointer> where the smart pointer takes care of relinquishing the
borrow and also implements the necessary Deref traits
* The modify() function was removed to cut the local_data interface down to its
bare essentials (similarly to how RefCell removed set/get).
[breaking-change]
2014-05-07 23:43:39 -07:00
..
2014-03-31 15:47:36 -07:00
2014-04-14 21:00:31 +05:30
2014-03-31 15:47:36 -07:00
2014-03-31 15:47:36 -07:00
2014-03-31 15:47:36 -07:00
2014-03-31 15:47:36 -07:00
2014-03-31 15:47:36 -07:00
2014-03-31 15:47:36 -07:00
2014-03-31 15:47:36 -07:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-18 17:25:34 -07:00
2014-04-18 17:25:34 -07:00
2014-04-06 15:55:43 -07:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-03-31 15:47:36 -07:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-04 15:57:45 -07:00
2014-04-14 21:00:31 +05:30
2014-04-20 13:41:18 +12:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-18 17:25:34 -07:00
2014-05-06 23:12:54 -07:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-03-31 19:50:51 -07:00
2014-03-30 03:47:04 +02:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-04 09:31:44 -07:00
2014-04-14 21:00:31 +05:30
2014-03-31 19:50:51 -07:00
2014-05-06 23:12:54 -07:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-18 17:25:34 -07:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-27 20:35:51 -07:00
2014-04-14 21:00:31 +05:30
2014-03-31 19:50:51 -07:00
2014-04-14 21:00:31 +05:30
2014-04-06 15:55:43 -07:00
2014-04-14 21:00:31 +05:30
2014-03-31 19:50:51 -07:00
2014-03-31 19:50:51 -07:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-05-02 11:39:18 -07:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-10 15:22:00 -07:00
2014-04-10 15:22:00 -07:00
2014-04-16 11:42:22 -07:00
2014-04-16 11:42:22 -07:00
2014-04-16 11:42:22 -07:00
2014-05-02 15:40:07 -07:00
2014-05-02 15:40:07 -07:00
2014-04-30 19:24:21 -07:00
2014-04-30 19:24:21 -07:00
2014-04-30 19:24:21 -07:00
2014-04-14 21:00:31 +05:30
2014-04-07 09:29:42 -07:00
2014-04-14 21:00:31 +05:30
2014-04-04 13:22:57 -07:00
2014-04-14 21:00:31 +05:30
2014-05-07 23:43:39 -07:00
2014-05-06 23:12:54 -07:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-03-31 15:47:36 -07:00
2014-04-06 02:37:25 +02:00
2014-03-31 18:59:46 -07:00
2014-03-31 15:47:36 -07:00
2014-04-18 17:25:34 -07:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30
2014-03-31 15:47:36 -07:00
2014-03-31 15:47:36 -07:00
2014-04-29 18:58:39 -07:00
2014-05-06 23:12:54 -07:00
2014-03-31 15:47:36 -07:00
2014-04-14 21:00:31 +05:30
2014-03-31 15:47:36 -07:00
2014-03-31 15:47:36 -07:00
2014-03-31 15:47:36 -07:00
2014-04-14 21:00:31 +05:30
2014-04-16 08:12:43 -07:00
2014-04-14 21:00:31 +05:30
2014-04-14 21:00:31 +05:30