mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
Merge e9b152fd87 into 53e615b920
This commit is contained in:
commit
e7c61fb2cb
1 changed files with 2 additions and 8 deletions
|
|
@ -38,10 +38,7 @@ pub fn firstUnchecked(self: FloatStream) u8 {
|
|||
}
|
||||
|
||||
pub fn first(self: FloatStream) ?u8 {
|
||||
return if (self.hasLen(1))
|
||||
return self.firstUnchecked()
|
||||
else
|
||||
null;
|
||||
return if (self.hasLen(1)) self.firstUnchecked() else null;
|
||||
}
|
||||
|
||||
pub fn isEmpty(self: FloatStream) bool {
|
||||
|
|
@ -84,10 +81,7 @@ pub fn readU64Unchecked(self: FloatStream) u64 {
|
|||
}
|
||||
|
||||
pub fn readU64(self: FloatStream) ?u64 {
|
||||
if (self.hasLen(8)) {
|
||||
return self.readU64Unchecked();
|
||||
}
|
||||
return null;
|
||||
return if (self.hasLen(8)) self.readU64Unchecked() else null;
|
||||
}
|
||||
|
||||
pub fn atUnchecked(self: *FloatStream, i: usize) u8 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue