minor changes

This commit is contained in:
ostamax 2022-06-16 18:08:26 +03:00
parent 905a5d7905
commit 099ab0b79b
22 changed files with 8 additions and 23 deletions

View File

@ -1,7 +1,6 @@
// functions1.rs
// Make me compile! Execute `rustlings hint functions1` for hints :)
// I AM NOT DONE
fn call_me() {
println!("Hello, world!");
}

View File

@ -1,7 +1,6 @@
// functions2.rs
// Make me compile! Execute `rustlings hint functions2` for hints :)
// I AM NOT DONE
fn main() {
call_me(3);

View File

@ -1,7 +1,6 @@
// functions3.rs
// Make me compile! Execute `rustlings hint functions3` for hints :)
// I AM NOT DONE
fn main() {
call_me(6);

View File

@ -4,7 +4,6 @@
// This store is having a sale where if the price is an even number, you get
// 10 Rustbucks off, but if it's an odd number, it's 3 Rustbucks off.
// I AM NOT DONE
fn main() {
let original_price = 51;

View File

@ -1,7 +1,6 @@
// functions5.rs
// Make me compile! Execute `rustlings hint functions5` for hints :)
// I AM NOT DONE
fn main() {
let answer = square(3);

View File

@ -1,6 +1,5 @@
// if1.rs
// I AM NOT DONE
pub fn bigger(a: i32, b: i32) -> i32 {
// Complete this function to return the bigger number!

View File

@ -4,7 +4,6 @@
// Step 2: Get the bar_for_fuzz and default_to_baz tests passing!
// Execute the command `rustlings hint if2` if you want a hint :)
// I AM NOT DONE
pub fn fizz_if_foo(fizzish: &str) -> &str {
if fizzish == "fizz" {

View File

@ -5,7 +5,6 @@
// ready for the next exercise, remove the `I AM NOT DONE` comment below.
// Execute the command `rustlings hint intro1` for a hint.
// I AM NOT DONE
fn main() {
println!("Hello and");

View File

@ -2,7 +2,6 @@
// Make the code print a greeting to the world.
// Execute `rustlings hint intro2` for a hint.
// I AM NOT DONE
fn main() {
println!("Hello {}!", "world");

View File

@ -1,7 +1,6 @@
// move_semantics1.rs
// Make me compile! Execute `rustlings hint move_semantics1` for hints :)
// I AM NOT DONE
fn main() {
let vec0 = Vec::new();

View File

@ -2,7 +2,6 @@
// Make me compile without changing line 13 or moving line 10!
// Execute `rustlings hint move_semantics2` for hints :)
// I AM NOT DONE
fn main() {
let vec0 : Vec<i32> = Vec::new();

View File

@ -3,7 +3,6 @@
// (no lines with multiple semicolons necessary!)
// Execute `rustlings hint move_semantics3` for hints :)
// I AM NOT DONE
fn main() {
let vec0 = Vec::new();

View File

@ -4,7 +4,6 @@
// freshly created vector from fill_vec to its caller.
// Execute `rustlings hint move_semantics4` for hints!
// I AM NOT DONE
fn main() {
// let vec0 = Vec::new();

View File

@ -3,7 +3,6 @@
// adding, changing or removing any of them.
// Execute `rustlings hint move_semantics5` for hints :)
// I AM NOT DONE
fn main() {
let mut x = 100;

View File

@ -2,7 +2,6 @@
// Make me compile! `rustlings hint move_semantics6` for hints
// You can't change anything except adding or removing references
// I AM NOT DONE
fn main() {
let data = "Rust is great!".to_string();

View File

@ -8,10 +8,16 @@
// more than 40 at once, each apple only costs 1! Write a function that calculates
// the price of an order of apples given the quantity bought. No hints this time!
// I AM NOT DONE
// Put your function here!
// fn calculate_apple_price {
fn calculate_apple_price(quantity: i32) -> i32 {
if quantity > 40 {
quantity
}
else {
quantity * 2
}
}
// Don't modify this function!
#[test]

View File

@ -2,7 +2,6 @@
// Make me compile!
// Execute the command `rustlings hint variables1` if you want a hint :)
// I AM NOT DONE
fn main() {
let x = 5;

View File

@ -1,7 +1,6 @@
// variables2.rs
// Make me compile! Execute the command `rustlings hint variables2` if you want a hint :)
// I AM NOT DONE
fn main() {
let x = 10;

View File

@ -1,7 +1,6 @@
// variables3.rs
// Make me compile! Execute the command `rustlings hint variables3` if you want a hint :)
// I AM NOT DONE
fn main() {
let mut x = 3;

View File

@ -1,7 +1,6 @@
// variables4.rs
// Make me compile! Execute the command `rustlings hint variables4` if you want a hint :)
// I AM NOT DONE
fn main() {
let x: i32 = 100;

View File

@ -1,7 +1,6 @@
// variables5.rs
// Make me compile! Execute the command `rustlings hint variables5` if you want a hint :)
// I AM NOT DONE
fn main() {
let number = "T-H-R-E-E"; // don't change this line

View File

@ -1,7 +1,6 @@
// variables6.rs
// Make me compile! Execute the command `rustlings hint variables6` if you want a hint :)
// I AM NOT DONE
const NUMBER: i8 = 3;
fn main() {