diff options
| author | Marten Ringwelski <git@maringuu.de> | 2020-11-02 17:12:40 +0100 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-11-02 17:45:20 +0100 |
| commit | 624a5c3e7af822a207246fcd91bd138b3f035d7f (patch) | |
| tree | 0c21f5cb5ba970f3ae71dcfd2c892b3fe88dc12e | |
| parent | d23b8a7f272690544d18cc0f1526213bcb83910e (diff) | |
| download | river-624a5c3e7af822a207246fcd91bd138b3f035d7f.tar.gz river-624a5c3e7af822a207246fcd91bd138b3f035d7f.tar.xz | |
code: Replace deprecated std.fmt.trim with std.mem.trim
| -rw-r--r-- | build.zig | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -154,9 +154,13 @@ const OldScanProtocolsStep = struct { fn make(step: *std.build.Step) !void { const self = @fieldParentPtr(OldScanProtocolsStep, "step", step); - const protocol_dir = std.fmt.trim(try self.builder.exec( - &[_][]const u8{ "pkg-config", "--variable=pkgdatadir", "wayland-protocols" }, - )); + const protocol_dir = std.mem.trim( + 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 u8{ protocol_dir, "stable/xdg-shell/xdg-shell.xml" }, |
