code: Replace deprecated std.fmt.trim with std.mem.trim

This commit is contained in:
Marten Ringwelski 2020-11-02 17:12:40 +01:00 committed by Isaac Freund
parent d23b8a7f27
commit 624a5c3e7a

View File

@ -154,9 +154,13 @@ const OldScanProtocolsStep = struct {
fn make(step: *std.build.Step) !void { fn make(step: *std.build.Step) !void {
const self = @fieldParentPtr(OldScanProtocolsStep, "step", step); const self = @fieldParentPtr(OldScanProtocolsStep, "step", step);
const protocol_dir = std.fmt.trim(try self.builder.exec( const protocol_dir = std.mem.trim(
&[_][]const u8{ "pkg-config", "--variable=pkgdatadir", "wayland-protocols" }, u8,
)); try self.builder.exec(
&[_][]const u8{ "pkg-config", "--variable=pkgdatadir", "wayland-protocols" },
),
&[_]u8 {' ', '\t', '\n', '\r'},
);
const protocol_dir_paths = [_][]const []const u8{ const protocol_dir_paths = [_][]const []const u8{
&[_][]const u8{ protocol_dir, "stable/xdg-shell/xdg-shell.xml" }, &[_][]const u8{ protocol_dir, "stable/xdg-shell/xdg-shell.xml" },