projects
/
rust-101.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4cac813
)
Update part01.rs
author
Budo Zindovic
<bzindovic@gmail.com>
Tue, 25 Apr 2023 07:48:59 +0000
(09:48 +0200)
committer
GitHub
<noreply@github.com>
Tue, 25 Apr 2023 07:48:59 +0000
(09:48 +0200)
src/part01.rs
patch
|
blob
|
history
diff --git
a/src/part01.rs
b/src/part01.rs
index a4537acbc18f05e621fc0b5d05cbbffd3bb7bfcd..e00cf536b397ae9eb73d5ca45758016c3fcae347 100644
(file)
--- a/
src/part01.rs
+++ b/
src/part01.rs
@@
-87,7
+87,7
@@
impl NumberOrNothing {
//@ methods on an `enum` (and also on `struct`, which we will learn about later)
//@ is independent of the definition of the type. `self` is like `this` in other
//@ languages, and its type is always implicit. So `print` is now a method that
//@ methods on an `enum` (and also on `struct`, which we will learn about later)
//@ is independent of the definition of the type. `self` is like `this` in other
//@ languages, and its type is always implicit. So `print` is now a method that
-//@ takes
as first argument a `NumberOrNothing`
, just like `print_number_or_nothing`.
+//@ takes
`NumberOrNothing` as the first argument
, just like `print_number_or_nothing`.
//@
//@ Try making `number_or_default` from above an inherent method as well!
//@
//@ Try making `number_or_default` from above an inherent method as well!