freetype/harfbuzz: more coverage #342

Merged
alichraghi merged 3 commits from main into main 2022-06-11 22:53:54 +00:00
alichraghi commented 2022-06-11 14:33:22 +00:00 (Migrated from github.com)
  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.
- [X] By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.
emidoots (Migrated from github.com) reviewed 2022-06-11 22:53:12 +00:00
@ -15,3 +15,3 @@
return Blob{
.handle = c.hb_blob_create_or_fail(data.ptr, @intCast(c_uint, data.len), @enumToInt(mode), null, null) orelse return null,
.handle = c.hb_blob_create_or_fail(&data[0], @intCast(c_uint, data.len), @enumToInt(mode), null, null) orelse return null,
};
emidoots (Migrated from github.com) commented 2022-06-11 22:53:12 +00:00

FYI this means an empty data slice cannot be passed in (panic on accessing index 0). I assume that's what you want / this is intentional? Otherwise .ptr would do what you want when data.len == 0.

FYI this means an empty `data` slice cannot be passed in (panic on accessing index 0). I assume that's what you want / this is intentional? Otherwise `.ptr` would do what you want when `data.len == 0`.
emidoots (Migrated from github.com) approved these changes 2022-06-11 22:53:50 +00:00
alichraghi (Migrated from github.com) reviewed 2022-06-11 23:12:00 +00:00
@ -15,3 +15,3 @@
return Blob{
.handle = c.hb_blob_create_or_fail(data.ptr, @intCast(c_uint, data.len), @enumToInt(mode), null, null) orelse return null,
.handle = c.hb_blob_create_or_fail(&data[0], @intCast(c_uint, data.len), @enumToInt(mode), null, null) orelse return null,
};
alichraghi (Migrated from github.com) commented 2022-06-11 23:12:00 +00:00

yes i just though it's better to panic there

yes i just though it's better to panic there
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach!342
No description provided.