mirror of
https://github.com/notohh/rustlings.git
synced 2024-12-04 02:29:28 -05:00
Use *=
This commit is contained in:
parent
584164a6ff
commit
db5911eb73
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ fn char_counter<T: AsRef<str>>(arg: T) -> usize {
|
||||||
// Squares a number using `as_mut()`.
|
// Squares a number using `as_mut()`.
|
||||||
fn num_sq<T: AsMut<u32>>(arg: &mut T) {
|
fn num_sq<T: AsMut<u32>>(arg: &mut T) {
|
||||||
let arg = arg.as_mut();
|
let arg = arg.as_mut();
|
||||||
*arg = *arg * *arg;
|
*arg *= *arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
Loading…
Reference in a new issue