Conversation
| - `std.process.getCwd*` 改名为 `currentPath*` | ||
| - `fs.path.relative` 变成纯函数,需要显式传入上下文 | ||
| - `File.Stat.atime` 变成可选值 | ||
| - `std.mem` 里 “index of” 系列统一更名为 “find” |
There was a problem hiding this comment.
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
| - `std.mem` 里 “index of” 系列统一更名为 “find” | |
| - `std.mem`里“index of”系列统一更名为“find”� |
|
|
||
| 也就是说,Zig 不再想长期维护那批半高层、半底层的历史包装函数。 | ||
|
|
||
| ### `std.mem` 的 “index of” 系列统一更名为 “find” |
There was a problem hiding this comment.
🚫 [AutoCorrect Lint] <AutoCorrect> reported by reviewdog 🐶
| ### `std.mem` 的 “index of” 系列统一更名为 “find” | |
| ### `std.mem`的“index of”系列统一更名为“find”� |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation to reflect the release of Zig 0.16.0. It includes a new version description file and a comprehensive upgrade guide from version 0.15.1, along with updates to the sidebar and theme configuration. The review feedback identifies two issues in the upgrade guide's code examples: a redundant constant redefinition in the C import section and a syntax error in the representation of the deprecated @type usage.
| pub const c = @cImport({ | ||
| @cInclude("stdio.h"); | ||
| @cInclude("math.h"); | ||
| @cInclude("stdlib.h"); | ||
| }); | ||
|
|
||
| const c = @import("c.zig").c; |
There was a problem hiding this comment.
The "Old way" code block contains a redefinition of the constant c. It first defines c using @cImport and then immediately tries to redefine it using @import. These should be presented as separate examples or the redundant line should be removed to avoid confusion.
| pub const c = @cImport({ | |
| @cInclude("stdio.h"); | |
| @cInclude("math.h"); | |
| @cInclude("stdlib.h"); | |
| }); | |
| const c = @import("c.zig").c; | |
| pub const c = @cImport({ | |
| @cInclude("stdio.h"); | |
| @cInclude("math.h"); | |
| @cInclude("stdlib.h"); | |
| }); |
| 常见迁移: | ||
|
|
||
| ```zig | ||
| @Type(.enum_literal) |
There was a problem hiding this comment.
No description provided.