aboutsummaryrefslogtreecommitdiff
path: root/src/lib/_int.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-22 15:44:13 -0700
committerGraydon Hoare <[email protected]>2010-09-22 15:44:13 -0700
commit2880ecd73ff7443ad72eb7af3c85e673024fc7fd (patch)
treeb9e703a5e279db41fa36bdbe9674abe8f159e91c /src/lib/_int.rs
parentMove llvm-using code in rustc to trans module. (diff)
downloadrust-2880ecd73ff7443ad72eb7af3c85e673024fc7fd.tar.xz
rust-2880ecd73ff7443ad72eb7af3c85e673024fc7fd.zip
Reformat standard library; no code changes.
Diffstat (limited to 'src/lib/_int.rs')
-rw-r--r--src/lib/_int.rs29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/lib/_int.rs b/src/lib/_int.rs
index 396dd331..38e161bc 100644
--- a/src/lib/_int.rs
+++ b/src/lib/_int.rs
@@ -19,18 +19,27 @@ fn nonpositive(int x) -> bool { ret x <= 0; }
fn nonnegative(int x) -> bool { ret x >= 0; }
iter range(mutable int lo, int hi) -> int {
- while (lo < hi) {
- put lo;
- lo += 1;
- }
+ while (lo < hi) {
+ put lo;
+ lo += 1;
+ }
}
fn to_str(mutable int n, uint radix) -> str
{
- check (0u < radix && radix <= 16u);
- if (n < 0) {
- ret "-" + _uint.to_str((-n) as uint, radix);
- } else {
- ret _uint.to_str(n as uint, radix);
- }
+ check (0u < radix && radix <= 16u);
+ if (n < 0) {
+ ret "-" + _uint.to_str((-n) as uint, radix);
+ } else {
+ ret _uint.to_str(n as uint, radix);
+ }
}
+
+// Local Variables:
+// mode: rust;
+// fill-column: 78;
+// indent-tabs-mode: nil
+// c-basic-offset: 4
+// buffer-file-coding-system: utf-8-unix
+// compile-command: "make -k -C .. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
+// End: