Skip to content

Commit 76191fd

Browse files
authored
Merge pull request #3 from der-teufel-programming/main
Fix usage of deprecated std.mem functions
2 parents a2a3ee1 + dba973b commit 76191fd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/mkfs.fat.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub const std_options: std.Options = .{
1212
},
1313
};
1414

15-
var fat_disk: fatfs.Disk = fatfs.Disk{
15+
var fat_disk: fatfs.Disk = .{
1616
.getStatusFn = disk_getStatus,
1717
.initializeFn = disk_initialize,
1818
.readFn = disk_read,

src/shared.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub fn App(comptime Context: type) type {
7070
try Context.init(file_system);
7171

7272
for (command_list) |command_sequence| {
73-
var cmd_iter = std.mem.split(u8, command_sequence, ":");
73+
var cmd_iter = std.mem.splitScalar(u8, command_sequence, ':');
7474

7575
const command_str = cmd_iter.next() orelse return mistake("bad command", .{});
7676

@@ -174,7 +174,7 @@ pub fn App(comptime Context: type) type {
174174
var list = std.ArrayList([]const u8).init(allocator);
175175
defer list.deinit();
176176

177-
var parts = std.mem.tokenize(u8, src_path, "\\/");
177+
var parts = std.mem.tokenizeAny(u8, src_path, "\\/");
178178

179179
while (parts.next()) |part| {
180180
if (std.mem.eql(u8, part, ".")) {

0 commit comments

Comments
 (0)