git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit4a665f46e2e6d76787ee3c811422fedf4b505755
parent2f286d9e69
authorMarten Ringwelski <[email protected]>
date2020-11-02 17:12
code: Replace deprecated std.fmt.trim with std.mem.trim

 build.zig | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/build.zig b/build.zig
index ff906b8..ecf3310 100644
--- a/build.zig
+++ b/build.zig
@@ -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" },