Skip to content
Snippets Groups Projects
Verified Commit 7785bfab authored by orestis.malaspin's avatar orestis.malaspin
Browse files

corrected comments

parent a87fb7d4
Branches
Tags v1.0.5
11 merge requests!34Switches part05 and part06,!31Adds part05summary,!26Adds part04 in summaries,!24Part03summary,!22Summary of part 2 is now done,!19Adds summary for part01 and array is copy,!14Adds summary text for part00,!13Adds part08 illustrates Vec and iterators,!12Adds part07 on the use of Vec and Error Handling,!11Adds part06 featuring modules and doc tests,!10Adds part05 borrowing and ownership
Pipeline #25267 passed
...@@ -107,9 +107,11 @@ fn print_tab(tab: &[i32; SIZE]) { ...@@ -107,9 +107,11 @@ fn print_tab(tab: &[i32; SIZE]) {
/// # Example /// # Example
/// ///
/// ``` /// ```
/// # fn main() {
/// let tab = [10, 32, 12, 43, 52, 53, 83, 2, 9]; /// let tab = [10, 32, 12, 43, 52, 53, 83, 2, 9];
/// let min = find_min(&tag); /// let min = find_min(&tab);
/// assert_eq!(min == SomethingOrNothing::Something(2)); /// assert!(min == SomethingOrNothing::Something(2));
/// # }
/// ``` /// ```
fn find_min<T: Minimum>(tab: &[T; SIZE]) -> SomethingOrNothing<T> { fn find_min<T: Minimum>(tab: &[T; SIZE]) -> SomethingOrNothing<T> {
let mut minimum = SomethingOrNothing::Nothing; let mut minimum = SomethingOrNothing::Nothing;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment