diff options
| author | bors <bors@rust-lang.org> | 2014-08-20 01:40:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-08-20 01:40:58 +0000 |
| commit | 4a0272da67d8fab7e1dd8950e92fb33480ba669a (patch) | |
| tree | b1591653e3811d4d84bc48d3d16ef9fd1272e178 | |
| parent | a6758e344bc13de90ee0583a5764092cfbc36df8 (diff) | |
| parent | f6a679f87ddfed6c759b8a9d5cfc0393a7b6d00b (diff) | |
auto merge of #16603 : SiegeLord/rust/nullable, r=alexcrichton
A few reasons: * `Nullable` is basically unused, save for one argument in the `glob` function in `liblibc`, so this change likely impacts nobody negatively. The constructors are never used, and I don't foresee people using them. The people implementing the glob functionality don't seem to be reaching for this POSIX `glob` function, so it seems unlikely to be used heavily. * At the same time, the old name, `Some`, needlessly conflicted with the same re-exported name in the prelude, which impacted everybody who use glob imports with `libc`. Changing it to something else would simplify things greatly for those people. * `NotNull` seemed like the best option (others included `Just`, `Valid`, etc. which all had somewhat different connotations than what this type was going for (even `Some` doesn't quite seem like the opposite of `Null`)). Other options included removing the type completely and adding a special, `glob`-specific type. This latter approach doesn't seem future-proof. Overall, I feel like this is a mildly positive change.
| -rw-r--r-- | src/liblibc/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 370dc4a0822..9c699a88007 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -304,7 +304,7 @@ extern {} // If/when libprim happens, this can be removed in favor of that pub enum Nullable<T> { Null, - Some(T) + NotNull(T) } pub mod types { |
