| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Basically, generic containers should not use the default methods since a
type of elements may not guarantees total order. str could use them
since u8's Ord guarantees total order. Floating point numbers are also
broken with the default methods because of NaN. Thanks for @thestinger.
Timespec also guarantees total order AIUI. I'm unsure whether
extra::semver::Identifier does so I left it alone. Proof needed.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
|
|
Range is now invertable as long as its element type conforms to Integer.
Remove int::range_rev() et al in favor of range().invert().
|
|
|
|
|
|
|
|
|
|
Also added unit tests of range code to test refactoring. The
num-range-rev.rs test will need to be updated when the range_rev
semantics change.
|
|
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16,
u32, u64, float, int, and uint are replaced with generic functions in
num instead.
If you were previously using any of those functions, just replace them
with the corresponding function with the same name in num.
Note: If you were using a function that corresponds to an operator, use
the operator instead.
|
|
|
|
This allows the integral paths to avoid allocations on the heap
Closes #4424, #4423
|
|
This is the backwards-incompatible part of per-binding-site "mut".
|
|
|
|
.as_bytes_with_null[_consume]().
The first acts on &str and is not nul-terminated, the last two act on strings
that are always null terminated (&'static str, ~str and @str).
|
|
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
|
|
|
|
Adds documentation for various things that I understand.
Adds #[allow(missing_doc)] for lots of things that I don't understand.
|
|
|
|
|
|
|