Merge branch 'main' of github.com:ratfactor/ziglings into main

This commit is contained in:
Dave Gauer 2021-04-26 20:34:47 -04:00
commit 8a7d6b03c7
2 changed files with 2 additions and 2 deletions

View file

@ -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 {

View file

@ -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"