reedlepee
92662a9f91
Removed unnecessary comments and white spaces as suggested
2013-10-23 01:10:50 +05:30
reedlepee
ad465441ba
Removed Unnecessary comments and white spaces #4386
2013-10-23 01:10:50 +05:30
reedlepee
0ada7c7ffe
Making fields in std and extra : private #4386
2013-10-23 01:10:50 +05:30
Alex Crichton
daf5f5a4d1
Drop the '2' suffix from logging macros
...
Who doesn't like a massive renaming?
2013-10-22 08:09:56 -07:00
Kevin Ballard
c01a97b7a9
path2: Remove .with_display_str and friends
...
Rewrite these methods as methods on Display and FilenameDisplay. This
turns
do path.with_display_str |s| { ... }
into
do path.display().with_str |s| { ... }
2013-10-15 22:19:53 -07:00
Kevin Ballard
d6d9b92683
path2: Adjust the API to remove all the _str mutation methods
...
Add a new trait BytesContainer that is implemented for both byte vectors
and strings.
Convert Path::from_vec and ::from_str to one function, Path::new().
Remove all the _str-suffixed mutation methods (push, join, with_*,
set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15 22:18:30 -07:00
Kevin Ballard
73d3d00ec4
path2: Replace the path module outright
...
Remove the old path.
Rename path2 to path.
Update all clients for the new path.
Also make some miscellaneous changes to the Path APIs to help the
adoption process.
2013-10-15 21:56:54 -07:00
Steve Klabnik
309ab958e6
Removing ccdecl
...
as per https://github.com/mozilla/rust/pull/9606#discussion_r6930872
2013-10-14 14:33:05 +02:00
Steve Klabnik
16fc6a694c
Remove unused abi attributes.
...
They've been replaced by putting the name on the extern block.
#[abi = "foo"]
goes to
extern "foo" { }
Closes #9483 .
2013-10-14 13:10:36 +02:00
Alex Crichton
ff95904c48
Remove usage of io::FILE_writer
2013-10-10 03:38:51 -07:00
Alex Crichton
4f67dcb24a
Migrate users of 'loop' to 'continue'
...
Closes #9467
2013-10-01 15:53:13 -07:00
Alex Crichton
a8ba31dbf3
std: Remove usage of fmt!
2013-09-30 23:21:18 -07:00
Alex Crichton
3585c64d09
rustdoc: Change all code-blocks with a script
...
find src -name '*.rs' | xargs sed -i '' 's/~~~.*{\.rust}/```rust/g'
find src -name '*.rs' | xargs sed -i '' 's/ ~~~$/ ```/g'
find src -name '*.rs' | xargs sed -i '' 's/^~~~$/ ```/g'
2013-09-25 14:27:42 -07:00
Patrick Walton
68ea9aed96
librustc: Remove @fn
managed closures from the language.
2013-09-23 18:23:21 -07:00
Daniel Micay
4e161a4d40
switch Drop to &mut self
2013-09-16 22:19:23 -04:00
Erick Tryzelaar
38f97ea103
std: Rename {Option,Result}::chain{,_err}* to {and_then,or_else}
2013-09-12 18:54:13 -07:00
bors
7820fb5ca9
auto merge of #9062 : blake2-ppc/rust/vec-iterator, r=alexcrichton
...
Visit the free functions of std::vec and reimplement or remove some. Most prominently, remove `each_permutation` and replace with two iterators, ElementSwaps and Permutations.
Replace unzip, unzip_slice with an updated `unzip` that works with an iterator argument.
Replace each_permutation with a Permutation iterator. The new permutation iterator is more efficient since it uses an algorithm that produces permutations in an order where each is only one element swap apart, including swapping back to the original state with one swap at the end.
Unify the seldomly used functions `build`, `build_sized`, `build_sized_opt` into just one function `build`.
Remove `equal_sizes`
2013-09-09 21:31:03 -07:00
blake2-ppc
c11ee0fb67
std::at_vec and vec: Unify build_sized, build_sized_opt into build
...
These functions have very few users since they are mostly replaced by
iterator-based constructions.
Convert a few remaining users in-tree, and reduce the number of
functions by basically renaming build_sized_opt to build, and removing
the other two. This for both the vec and the at_vec versions.
2013-09-10 05:50:11 +02:00
Daniel Micay
6919cf5fe1
rename std::iterator
to std::iter
...
The trait will keep the `Iterator` naming, but a more concise module
name makes using the free functions less verbose. The module will define
iterables in addition to iterators, as it deals with iteration in
general.
2013-09-09 03:21:46 -04:00
Florian Hahn
de39874801
Rename str::from_bytes to str::from_utf8, closes #8985
2013-09-05 14:17:24 +02:00
Daniel Micay
62a3434529
stop treating char as an integer type
...
Closes #7609
2013-09-04 08:07:56 -04:00
Bouke van der Bijl
a2ffceaedd
Add missing space
2013-08-30 12:53:05 +02:00
klutzy
6aff4c67f6
std: Bind write() on Win64
2013-08-26 22:15:32 +09:00
Vadim Chugunov
12ecdb6381
Enabled unit tests in std and extra.
2013-08-22 20:02:20 -07:00
Niko Matsakis
0479d946c8
Add externfn macro and correctly label fixed_stack_segments
2013-08-19 07:13:15 -04:00
bors
3bc6858428
auto merge of #8551 : huonw/rust/speling, r=alexcrichton
...
(This doesn't add/remove `u`s or change `ize` to `ise`, or anything like that.)
2013-08-18 05:11:58 -07:00
Huon Wilson
6440343a6c
More spelling corrections.
2013-08-18 08:28:04 +10:00
Huon Wilson
72fd02d939
doc: convert remaining uses of core:: to std::.
2013-08-16 15:54:14 +10:00
Kevin Ballard
03ef71e262
Add ToCStr method .with_c_str()
...
.with_c_str() is a replacement for the old .as_c_str(), to avoid
unnecessary boilerplate.
Replace all usages of .to_c_str().with_ref() with .with_c_str().
2013-08-15 01:33:10 -07:00
Daniel Micay
0cb0ef2ca5
fix build with the new snapshot compiler
2013-08-12 17:37:46 -04:00
Erick Tryzelaar
5eaa4d1d2f
Merge remote-tracking branch 'remotes/origin/master' into remove-str-trailing-nulls
2013-08-06 16:21:02 -07:00
darkf
180d050138
Open files in binary mode. Closes #3948
2013-08-04 21:54:24 -07:00
Erick Tryzelaar
3c94b5044c
Merge remote-tracking branch 'remotes/origin/master' into str-remove-null
2013-08-04 16:23:41 -07:00
Erick Tryzelaar
5865a7597b
Remove trailing null from strings
2013-08-04 15:45:16 -07:00
Erick Tryzelaar
3102b1797e
std: replace str::as_c_str with std::c_str
2013-08-04 14:13:17 -07:00
Daniel Micay
1008945528
remove obsolete foreach
keyword
...
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
Patrick Walton
9457ebee55
librustc: Disallow "unsafe" for external functions
2013-08-02 21:57:59 -07:00
blake2-ppc
b18bd785ec
std: Replace for
with do { .. }
expr where internal iterators are used
2013-08-01 16:54:22 +02:00
Daniel Micay
1fc4db2d08
migrate many for
loops to foreach
2013-08-01 05:34:55 -04:00
Daniel Micay
ef870d37a5
implement pointer arithmetic with GEP
...
Closes #8118 , #7136
~~~rust
extern mod extra;
use std::vec;
use std::ptr;
fn bench_from_elem(b: &mut extra::test::BenchHarness) {
do b.iter {
let v: ~[u8] = vec::from_elem(1024, 0u8);
}
}
fn bench_set_memory(b: &mut extra::test::BenchHarness) {
do b.iter {
let mut v: ~[u8] = vec::with_capacity(1024);
unsafe {
let vp = vec::raw::to_mut_ptr(v);
ptr::set_memory(vp, 0, 1024);
vec::raw::set_len(&mut v, 1024);
}
}
}
fn bench_vec_repeat(b: &mut extra::test::BenchHarness) {
do b.iter {
let v: ~[u8] = ~[0u8, ..1024];
}
}
~~~
Before:
test bench_from_elem ... bench: 415 ns/iter (+/- 17)
test bench_set_memory ... bench: 85 ns/iter (+/- 4)
test bench_vec_repeat ... bench: 83 ns/iter (+/- 3)
After:
test bench_from_elem ... bench: 84 ns/iter (+/- 2)
test bench_set_memory ... bench: 84 ns/iter (+/- 5)
test bench_vec_repeat ... bench: 84 ns/iter (+/- 3)
2013-07-30 02:50:31 -04:00
Stepan Koltsov
b92d1ea723
ReaderUtil::each_byte shouldn't include EOF byte -- Issue #5056
2013-07-28 16:53:00 +04:00
Erick Tryzelaar
3478589b99
std and rustc: cleanup uses of result methods
2013-07-27 23:42:53 -07:00
maikklein
f6bcf5d5f1
cleanup .chain and .chain_err + fixing other files
2013-07-27 23:41:09 -07:00
Erick Tryzelaar
e308167a2f
cleanup .unwrap and .unwrap_err fixing io tests
2013-07-27 23:41:09 -07:00
Erick Tryzelaar
31b77aecfc
std: remove str::to_owned and str::raw::slice_bytes_owned
2013-07-23 16:56:23 -07:00
Erick Tryzelaar
7af56bb921
std: move StrUtil::as_c_str into StrSlice
2013-07-23 16:56:22 -07:00
Erick Tryzelaar
cfd89c4075
std: remove os::as_c_charp
2013-07-23 16:56:22 -07:00
Patrick Walton
06594ed96b
librustc: Remove pub extern
and priv extern
from the language.
...
Place `pub` or `priv` on individual items instead.
2013-07-20 17:39:38 -07:00
Patrick Walton
88fe4ae09c
librustc: Remove the Copy
bound from the language.
2013-07-17 14:57:54 -07:00
Patrick Walton
2dbb3c3887
test: Fix tests.
2013-07-17 14:57:54 -07:00