mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 04:55:22 +03:00
minor core/std cleanup
This commit is contained in:
+3
-3
@@ -910,7 +910,7 @@ fn with_parent_tg<U>(parent_group: &mut Option<TaskGroupArc>,
|
||||
}
|
||||
|
||||
// One of these per task.
|
||||
struct Tcb {
|
||||
struct TCB {
|
||||
let me: *rust_task;
|
||||
// List of tasks with whose fates this one's is intertwined.
|
||||
let tasks: TaskGroupArc; // 'none' means the group has failed.
|
||||
@@ -1051,7 +1051,7 @@ fn gen_child_taskgroup(linked: bool, supervised: bool)
|
||||
mut descendants: new_taskset() }));
|
||||
// Main task/group has no ancestors, no notifier, etc.
|
||||
let group =
|
||||
@Tcb(spawner, tasks, AncestorList(None), true, None);
|
||||
@TCB(spawner, tasks, AncestorList(None), true, None);
|
||||
unsafe { local_set(spawner, taskgroup_key!(), group); }
|
||||
group
|
||||
}
|
||||
@@ -1165,7 +1165,7 @@ fn make_child_wrapper(child: *rust_task, +child_arc: TaskGroupArc,
|
||||
let notifier = notify_chan.map(|c| AutoNotify(c));
|
||||
|
||||
if enlist_many(child, &child_arc, &mut ancestors) {
|
||||
let group = @Tcb(child, child_arc, ancestors,
|
||||
let group = @TCB(child, child_arc, ancestors,
|
||||
is_main, notifier);
|
||||
unsafe { local_set(child, taskgroup_key!(), group); }
|
||||
// Run the child's body.
|
||||
|
||||
@@ -877,7 +877,7 @@ fn test_multi() {
|
||||
let opts = ~[optopt(~"e"), optopt(~"encrypt")];
|
||||
let matches = match getopts(args, opts) {
|
||||
result::ok(m) => m,
|
||||
result::err(f) => fail
|
||||
result::err(_) => fail
|
||||
};
|
||||
assert opts_present(matches, ~[~"e"]);
|
||||
assert opts_present(matches, ~[~"encrypt"]);
|
||||
@@ -898,7 +898,7 @@ fn test_nospace() {
|
||||
let opts = ~[optmulti(~"L")];
|
||||
let matches = match getopts(args, opts) {
|
||||
result::ok(m) => m,
|
||||
result::err(f) => fail
|
||||
result::err(_) => fail
|
||||
};
|
||||
assert opts_present(matches, ~[~"L"]);
|
||||
assert opts_str(matches, ~[~"L"]) == ~"foo";
|
||||
|
||||
Reference in New Issue
Block a user