Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alstn2468/rustlings-solution
/ functions
Functions
309 in github.com/alstn2468/rustlings-solution
⨍
Functions
309
◇
Types & classes
55
↓ 7 callers
Function
string
(arg: String)
exercises/quiz2.rs:13
↓ 6 callers
Function
temp_file
()
src/exercise.rs:17
↓ 5 callers
Method
looks_done
Check that the exercise looks to be solved using self.state() This is not the best way to check since the user can just remove the "I AM NOT DONE" str
src/exercise.rs:247
↓ 4 callers
Method
compile
(&self)
src/exercise.rs:109
↓ 4 callers
Method
process
(&mut self, message: Message)
exercises/enums/enums3.rs:39
↓ 4 callers
Method
run
Run the compiled exercise
src/exercise.rs:86
↓ 3 callers
Function
calculate_apple_price
Put your function here!
exercises/quiz1.rs:11
↓ 3 callers
Function
compile
Compile the given Exercise and return an object with information about the state of the compilation
src/verify.rs:115
↓ 3 callers
Function
fruit_basket
(basket: &mut HashMap<Fruit, u32>)
exercises/collections/hashmap2.rs:26
↓ 3 callers
Function
get_fruit_basket
()
exercises/collections/hashmap2.rs:44
↓ 3 callers
Function
get_map
()
exercises/standard_library_types/iterators5.rs:95
↓ 3 callers
Function
prompt_for_completion
(exercise: &Exercise, prompt_output: Option<String>)
src/verify.rs:135
↓ 3 callers
Method
state
(&self)
src/exercise.rs:199
↓ 3 callers
Function
string_slice
(arg: &str)
exercises/quiz2.rs:10
↓ 3 callers
Function
verify
Verify that the provided container of Exercise objects can be compiled and run without any failures. Any such failures will be reported to the end use
src/verify.rs:11
↓ 2 callers
Function
clean
()
src/exercise.rs:259
↓ 2 callers
Function
clear_screen
Clears the terminal with an ANSI escape code. Works in UNIX and newer Windows terminals. */
src/main.rs:341
↓ 2 callers
Function
compile_and_run
Invoke the rust compiler on the path of the given exercise and run the ensuing binary. This is strictly for non-test binaries, so output is displayed
src/run.rs:21
↓ 2 callers
Function
compile_and_test
Compile the given Exercise as a test harness and display the output if verbose is set to true
src/verify.rs:81
↓ 2 callers
Function
divide
Calculate `a` divided by `b` if `a` is evenly divisible by `b`. Otherwise, return a suitable error.
exercises/standard_library_types/iterators3.rs:23
↓ 2 callers
Function
find_exercise
(name: &str, exercises: &'a [Exercise])
src/main.rs:312
↓ 2 callers
Function
fruit_basket
()
exercises/collections/hashmap1.rs:16
↓ 2 callers
Function
get_vec_map
()
exercises/standard_library_types/iterators5.rs:109
↓ 2 callers
Function
print_number
you can modify anything EXCEPT for this function's sig
exercises/option/option1.rs:5
↓ 1 callers
Method
append_bar
(self)
exercises/traits/traits1.rs:16
↓ 1 callers
Method
append_bar
(mut self)
exercises/traits/traits2.rs:18
↓ 1 callers
Function
array_and_vec
()
exercises/collections/vec1.rs:7
↓ 1 callers
Method
call
(&self)
exercises/enums/enums2.rs:13
↓ 1 callers
Function
call_me
(num: u32)
exercises/functions/functions3.rs:8
↓ 1 callers
Function
call_me
()
exercises/functions/functions1.rs:4
↓ 1 callers
Function
call_me
(num: i32)
exercises/functions/functions2.rs:8
↓ 1 callers
Function
capitalize_first
Step 1. Complete the `capitalize_first` function. "hello" -> "Hello"
exercises/standard_library_types/iterators2.rs:9
↓ 1 callers
Function
capitalize_words_vector
Step 2. Apply the `capitalize_first` function to a slice of string slices. Return a vector of strings. ["hello", "world"] -> ["Hello", "World"]
exercises/standard_library_types/iterators2.rs:21
↓ 1 callers
Method
change_color
(&mut self, color: (u8, u8, u8))
exercises/enums/enums3.rs:23
↓ 1 callers
Function
compile_and_run_interactively
Compile the given Exercise and run the resulting binary in an interactive mode
src/verify.rs:53
↓ 1 callers
Function
compile_only
Invoke the rust compiler without running the resulting binary
src/verify.rs:40
↓ 1 callers
Function
count_iterator
(map: &HashMap<String, Progress>, value: Progress)
exercises/standard_library_types/iterators5.rs:32
↓ 1 callers
Function
create_order_template
()
exercises/structs/structs2.rs:15
↓ 1 callers
Function
current_favorite_color
()
exercises/strings/strings1.rs:10
↓ 1 callers
Method
echo
(&self, s: String)
exercises/enums/enums3.rs:31
↓ 1 callers
Function
fill_vec
(mut vec: Vec<i32>)
exercises/move_semantics/move_semantics3.rs:18
↓ 1 callers
Function
fill_vec
(vec: Vec<i32>)
exercises/move_semantics/move_semantics1.rs:16
↓ 1 callers
Function
fill_vec
(vec: Vec<i32>)
exercises/move_semantics/move_semantics2.rs:20
↓ 1 callers
Function
fill_vec
`fill_vec()` no longer takes `vec: Vec<i32>` as argument
exercises/move_semantics/move_semantics4.rs:18
↓ 1 callers
Function
get_secret_recipe
Don't let anybody outside of this module see this!
exercises/modules/modules1.rs:6
↓ 1 callers
Function
is_a_color_word
(attempt: &str)
exercises/strings/strings2.rs:14
↓ 1 callers
Function
is_even
(num: i32)
exercises/functions/functions4.rs:20
↓ 1 callers
Function
make_sausage
()
exercises/modules/modules1.rs:10
↓ 1 callers
Method
move_position
(&mut self, p: Point)
exercises/enums/enums3.rs:35
↓ 1 callers
Method
quit
(&mut self)
exercises/enums/enums3.rs:27
↓ 1 callers
Function
run
Invoke the rust compiler on the path of the given exercise, and run the ensuing binary. The verbose argument helps determine whether or not to show th
src/run.rs:9
↓ 1 callers
Function
rustc_exists
()
src/main.rs:398
↓ 1 callers
Function
spawn_watch_shell
( failed_exercise_hint: &Arc<Mutex<Option<String>>>, should_quit: Arc<AtomicBool>, )
src/main.rs:274
↓ 1 callers
Function
square
(num: i32)
exercises/functions/functions5.rs:9
↓ 1 callers
Function
test
Compile and run the resulting test harness of the given Exercise
src/verify.rs:34
↓ 1 callers
Function
total_cost
(item_quantity: &str)
exercises/error_handling/errors3.rs:25
↓ 1 callers
Function
vec_loop
(mut v: Vec<i32>)
exercises/collections/vec2.rs:10
↓ 1 callers
Function
watch
(exercises: &[Exercise], verbose: bool)
src/main.rs:338
Function
all_exercises_require_confirmation
()
tests/integration_tests.rs:125
Function
at_least_five_fruits
()
exercises/collections/hashmap1.rs:38
Function
at_least_five_types_of_fruits
()
exercises/collections/hashmap2.rs:63
Function
at_least_three_types_of_fruits
()
exercises/collections/hashmap1.rs:32
Function
average
(values: &[f64])
exercises/conversions/using_as.rs:8
Function
bar_for_fuzz
()
exercises/if/if2.rs:28
Function
bigger
(a: i32, b: i32)
exercises/if/if1.rs:3
Function
byte_counter
Obtain the number of bytes (not characters) in the given argument Add the AsRef trait appropriately as a trait bound
exercises/conversions/as_ref_mut.rs:7
Function
calculate_transport_fees
()
exercises/structs/structs3.rs:70
Function
capitalize_words_string
Step 3. Apply the `capitalize_first` function again to a slice of string slices. Return a single string. ["hello", " ", "world"] -> "Hello World"
exercises/standard_library_types/iterators2.rs:32
Function
char_counter
Obtain the number of characters (not bytes) in the given argument Add the AsRef trait appropriately as a trait bound
exercises/conversions/as_ref_mut.rs:13
Function
classic_c_structs
()
exercises/structs/structs1.rs:19
Function
count_collection_complete
()
exercises/standard_library_types/iterators5.rs:78
Function
count_collection_equals_for
()
exercises/standard_library_types/iterators5.rs:87
Function
count_collection_for
(collection: &[HashMap<String, Progress>], value: Progress)
exercises/standard_library_types/iterators5.rs:39
Function
count_collection_iterator
(collection: &[HashMap<String, Progress>], value: Progress)
exercises/standard_library_types/iterators5.rs:51
Function
count_complete
()
exercises/standard_library_types/iterators5.rs:63
Function
count_equals_for
()
exercises/standard_library_types/iterators5.rs:69
Function
count_for
(map: &HashMap<String, Progress>, value: Progress)
exercises/standard_library_types/iterators5.rs:22
Function
create_empty_list
()
exercises/standard_library_types/box1.rs:35
Function
create_international_package
()
exercises/structs/structs3.rs:50
Function
create_local_package
()
exercises/structs/structs3.rs:60
Function
create_non_empty_list
()
exercises/standard_library_types/box1.rs:39
Method
default
()
exercises/conversions/from_into.rs:13
Function
default_to_baz
()
exercises/if/if2.rs:33
Function
different_counts
()
exercises/conversions/as_ref_mut.rs:28
Function
different_counts_using_string
()
exercises/conversions/as_ref_mut.rs:40
Method
drop
(&mut self)
src/exercise.rs:103
Function
empty_input
()
exercises/conversions/from_str.rs:80
Function
explains_why_generating_nametag_text_fails
()
exercises/error_handling/errors1.rs:34
Function
factorial
(num: u64)
exercises/standard_library_types/iterators4.rs:3
Function
factorial_of_1
()
exercises/standard_library_types/iterators4.rs:12
Function
factorial_of_2
()
exercises/standard_library_types/iterators4.rs:16
Function
factorial_of_4
()
exercises/standard_library_types/iterators4.rs:21
Function
fail_creating_weightless_package
()
exercises/structs/structs3.rs:42
Function
fails_when_in_wrong_dir
()
tests/integration_tests.rs:15
Function
fizz_if_foo
(fizzish: &str)
exercises/if/if2.rs:7
Method
fmt
(&self, f: &mut Formatter)
src/exercise.rs:253
Method
fmt
TODO: Complete this function so that it produces the correct strings for each error variant.
exercises/advanced_errors/advanced_errs2.rs:61
Method
fmt
(&self, f: &mut fmt::Formatter)
exercises/error_handling/errors5.rs:41
Function
foo_for_fizz
()
exercises/if/if2.rs:23
Function
fortytwo_is_bigger_than_thirtytwo
()
exercises/if/if1.rs:23
next →
1–100 of 309, ranked by callers