This commit is contained in:
palutz 2023-09-29 19:30:12 +01:00
parent 0f7fbc10e6
commit 0cdc1122e6

View File

@ -23,9 +23,9 @@ fn char_counter<T>(arg: T) -> usize {
// Squares a number using as_mut(). // Squares a number using as_mut().
// TODO: Add the appropriate trait bound. // TODO: Add the appropriate trait bound.
fn num_sq<T>(arg: &mut T) { fn num_sq<T : std::ops::Add<Output = T>>(arg: &mut T) {
// TODO: Implement the function body. // TODO: Implement the function body.
??? arg = arg * arg;
} }
#[cfg(test)] #[cfg(test)]