Skip to content

Commit

Permalink
Merge pull request #10 from cs-dust/release-prep
Browse files Browse the repository at this point in the history
Final touches before release
  • Loading branch information
sevenseasofbri authored Apr 15, 2023
2 parents bd38dad + eda7c1e commit c160b0c
Show file tree
Hide file tree
Showing 16 changed files with 799 additions and 577 deletions.
6 changes: 3 additions & 3 deletions examples/block_expression_primitive_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn main() {
2 * x;
};

println("x is {:?}", x);
println("y is {:?}", y);
println("z is {:?}", z);
println("x is : ", x);
println("y is : ", y);
println("z is : ", z);
}
4 changes: 2 additions & 2 deletions examples/function_application_nested_vs_normal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ fn main() {
fn nested_function(x: i64, y: i64) -> i64 {
x + y
}
println("nested function adds 5 and 10 as", nested_function(five(), ten()));
println("normal function adds 5 and 10 as", add(five(), ten()));
println("nested function adds 5 and 10 as ", nested_function(five(), ten()));
println("normal function adds 5 and 10 as ", add(five(), ten()));
}

fn five() -> i64 {
Expand Down
2 changes: 1 addition & 1 deletion examples/function_return_addition.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fn main() {
let x = plus(1, 2);
println("The value of x is :{}", x);
println("The value of x is : ", x);
}

fn plus(x: i64, y: i64) -> i64 {
Expand Down
2 changes: 1 addition & 1 deletion examples/nested_function.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fn main() {
fn another_function(x: i64) {
println("The value of x is: {}", x);
println("The value of x is: ", x);
}
another_function(5);
}
2 changes: 1 addition & 1 deletion examples/numeric_types_with_binop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn main() {
let multiply = x * 9;
println("x * 9 is ", multiply);

let divide = 10/x;
let divide = 10 / x;
println("10 / x is ", divide);

println("x - y is ", x - y);
Expand Down
2 changes: 1 addition & 1 deletion examples/ownership_function_example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn main() {
}

fn takes_ownership(s: String) {
println("Taken ownership of", s);
println("Taken ownership of ", s);
}

fn makes_copy(i: i64) {
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_binop.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fn main() {
println("1 + 2 gives", 1 + 2);
println("1 + 2 gives ", 1 + 2);
}
4 changes: 2 additions & 2 deletions examples/string_concat_move_example1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ fn main() {
let b = " world";
let c = a + b;
println("a should have moved: ", a);
println("b should remain since it was borrowed", b);
println("c is the new concatenated string", c);
println("b should remain since it was borrowed: ", b);
println("c is the new concatenated string: ", c);
}
2 changes: 1 addition & 1 deletion examples/string_concat_move_example2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ fn main() {
let a = "hello";
let c = a + " world";
println("a should have moved: ", a);
println("c is the new concatenated string", c);
println("c is the new concatenated string: ", c);
}
2 changes: 1 addition & 1 deletion examples/string_overwrite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ fn main() {
let a = "sad";
let b = " lol";
a = b;
println("a should have a changed value", a);
println("a should have a changed value: ", a);
}
2 changes: 1 addition & 1 deletion examples/while_loop_example.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fn main() {
let mut x = 5;
while x > 0 {
println("decrementing {}", x);
println("decrementing x: ", x);
x = x - 1;
let y = 12;
}
Expand Down
Loading

0 comments on commit c160b0c

Please sign in to comment.