From a3ad0a2f771e2c6b4b71d694ff4ea8fc1aa26479 Mon Sep 17 00:00:00 2001 From: Shun Sakai Date: Wed, 22 Jan 2025 23:34:57 +0900 Subject: [PATCH 1/3] std.compress.flate.Lookup: Replace invisible doc comments with top-level doc comments I think it would be better if this invisible doc comments is top-level doc comments rather than doc comments. Because it is at the start of a source file. This makes the doc comments visible. --- lib/std/compress/flate/Lookup.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/std/compress/flate/Lookup.zig b/lib/std/compress/flate/Lookup.zig index c646b2dd28..90d0341bca 100644 --- a/lib/std/compress/flate/Lookup.zig +++ b/lib/std/compress/flate/Lookup.zig @@ -1,7 +1,7 @@ -/// Lookup of the previous locations for the same 4 byte data. Works on hash of -/// 4 bytes data. Head contains position of the first match for each hash. Chain -/// points to the previous position of the same hash given the current location. -/// +//! Lookup of the previous locations for the same 4 byte data. Works on hash of +//! 4 bytes data. Head contains position of the first match for each hash. Chain +//! points to the previous position of the same hash given the current location. + const std = @import("std"); const testing = std.testing; const expect = testing.expect; From 30fc1012ae28afcff6178997287bb7daeef077f6 Mon Sep 17 00:00:00 2001 From: Shun Sakai Date: Wed, 22 Jan 2025 23:37:04 +0900 Subject: [PATCH 2/3] std.zip: Replace invisible doc comments with top-level doc comments I think it would be better if this invisible doc comments is top-level doc comments rather than doc comments. Because it is at the start of a source file. This makes the doc comments visible. However, the last paragraph replaces doc comments with normal comments. This is because I thought that normal comments would be more appropriate than top-level doc comments given the context of the last paragraph. --- lib/std/zip.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/std/zip.zig b/lib/std/zip.zig index 2f3f4d9dcd..bafd427262 100644 --- a/lib/std/zip.zig +++ b/lib/std/zip.zig @@ -1,8 +1,8 @@ -/// The .ZIP File Format Specification is found here: -/// https://pkwaredownloads.blob.core.windows.net/pem/APPNOTE.txt -/// -/// Note that this file uses the abbreviation "cd" for "central directory" -/// +//! The .ZIP File Format Specification is found here: +//! https://pkwaredownloads.blob.core.windows.net/pem/APPNOTE.txt + +// Note that this file uses the abbreviation "cd" for "central directory" + const builtin = @import("builtin"); const std = @import("std"); const testing = std.testing; From 7599216341251a6c24428259977d52908f9f2a3d Mon Sep 17 00:00:00 2001 From: Shun Sakai Date: Mon, 27 Jan 2025 12:24:36 +0900 Subject: [PATCH 3/3] std.zip: Include the last paragraph in top-level doc comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alex Rønne Petersen --- lib/std/zip.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/zip.zig b/lib/std/zip.zig index bafd427262..0717694c49 100644 --- a/lib/std/zip.zig +++ b/lib/std/zip.zig @@ -1,7 +1,7 @@ //! The .ZIP File Format Specification is found here: //! https://pkwaredownloads.blob.core.windows.net/pem/APPNOTE.txt - -// Note that this file uses the abbreviation "cd" for "central directory" +//! +//! Note that this file uses the abbreviation "cd" for "central directory" const builtin = @import("builtin"); const std = @import("std");