mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-12-22 14:03:10 -05:00
Merge branch 'main' of github.com:ratfactor/ziglings into main
This commit is contained in:
commit
8a7d6b03c7
2 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ const Elephant = struct {
|
||||||
|
|
||||||
// New Elephant methods!
|
// New Elephant methods!
|
||||||
pub fn getTail(self: *Elephant) *Elephant {
|
pub fn getTail(self: *Elephant) *Elephant {
|
||||||
return self.tail.?; // Remember, this is means "orelse unreachable"
|
return self.tail.?; // Remember, this means "orelse unreachable"
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn hasTail(self: *Elephant) bool {
|
pub fn hasTail(self: *Elephant) bool {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
// 2. Numeric types can coerce to _larger_ types.
|
// 2. Numeric types can coerce to _larger_ types.
|
||||||
//
|
//
|
||||||
// var n1: u8 = 5;
|
// var n1: u8 = 5;
|
||||||
// var n2: u16 = n8; // integer "widening"
|
// var n2: u16 = n1; // integer "widening"
|
||||||
//
|
//
|
||||||
// var n3: f16 = 42.0;
|
// var n3: f16 = 42.0;
|
||||||
// var n4: f32 = n3; // float "widening"
|
// var n4: f32 = n3; // float "widening"
|
||||||
|
|
Loading…
Reference in a new issue