diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2014-01-26 13:25:02 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-01-26 13:33:05 +1100 |
| commit | 0aef487a5c2797b34e64ddcfa3974264fbc9830b (patch) | |
| tree | 9633f80b156d69af708248edd37a0dc7d66b701e /src/libextra | |
| parent | 6516b303b5f35e81350cccdf6629766e2b0a027e (diff) | |
| download | rust-0aef487a5c2797b34e64ddcfa3974264fbc9830b.tar.gz rust-0aef487a5c2797b34e64ddcfa3974264fbc9830b.zip | |
std,extra: Make some types public and other private.
These are either returned from public functions, and really should appear in the documentation, but don't since they're private, or are implementation details that are currently public.
Diffstat (limited to 'src/libextra')
| -rw-r--r-- | src/libextra/btree.rs | 15 | ||||
| -rw-r--r-- | src/libextra/test.rs | 6 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/libextra/btree.rs b/src/libextra/btree.rs index ee6d7e8f16f..791673d75bb 100644 --- a/src/libextra/btree.rs +++ b/src/libextra/btree.rs @@ -22,10 +22,10 @@ ///number of elements that a given node can contain. #[allow(missing_doc)] pub struct BTree<K, V> { - root: Node<K, V>, - len: uint, - lower_bound: uint, - upper_bound: uint + priv root: Node<K, V>, + priv len: uint, + priv lower_bound: uint, + priv upper_bound: uint } //We would probably want to remove the dependence on the Clone trait in the future. @@ -47,9 +47,9 @@ impl<K: TotalOrd, V> BTree<K, V> { ///Helper function for clone: returns new BTree with supplied root node, ///length, and lower bound. For use when the length is known already. - pub fn new_with_node_len(n: Node<K, V>, - length: uint, - lb: uint) -> BTree<K, V> { + fn new_with_node_len(n: Node<K, V>, + length: uint, + lb: uint) -> BTree<K, V> { BTree { root: n, len: length, @@ -590,4 +590,3 @@ mod test_btree { } } - diff --git a/src/libextra/test.rs b/src/libextra/test.rs index 1b98a9af548..a54f3110cd6 100644 --- a/src/libextra/test.rs +++ b/src/libextra/test.rs @@ -202,7 +202,8 @@ pub struct TestOpts { logfile: Option<Path> } -type OptRes = Result<TestOpts, ~str>; +/// Result of parsing the options. +pub type OptRes = Result<TestOpts, ~str>; fn optgroups() -> ~[getopts::groups::OptGroup] { ~[groups::optflag("", "ignored", "Run ignored tests"), @@ -722,7 +723,8 @@ enum TestEvent { TeResult(TestDesc, TestResult), } -type MonitorMsg = (TestDesc, TestResult); +/// The message sent to the test monitor from the individual runners. +pub type MonitorMsg = (TestDesc, TestResult); fn run_tests(opts: &TestOpts, tests: ~[TestDescAndFn], |
