Skip to content

Commit 4a0272d

Browse files
committed
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.
2 parents a6758e3 + f6a679f commit 4a0272d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/liblibc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ extern {}
304304
// If/when libprim happens, this can be removed in favor of that
305305
pub enum Nullable<T> {
306306
Null,
307-
Some(T)
307+
NotNull(T)
308308
}
309309

310310
pub mod types {

0 commit comments

Comments
 (0)