Update the coding style for Zig (#336)

* Update the coding style for Zig

* Update array.rs
This commit is contained in:
sjinzh
2023-02-06 01:14:03 +08:00
committed by GitHub
parent cb73007495
commit 063501068b
26 changed files with 40 additions and 61 deletions

View File

@@ -112,7 +112,6 @@ pub fn main() !void {
var index = find(nums, 3);
std.debug.print("\n在 nums 中查找元素 3 ,得到索引 = {}\n", .{index});
const getchar = try std.io.getStdIn().reader().readByte();
_ = getchar;
_ = try std.io.getStdIn().reader().readByte();
}

View File

@@ -80,6 +80,5 @@ pub fn main() !void {
var index = find(&n0, 2);
std.debug.print("链表中值为 2 的结点的索引 = {}\n", .{index});
const getchar = try std.io.getStdIn().reader().readByte();
_ = getchar;
_ = try std.io.getStdIn().reader().readByte();
}

View File

@@ -74,7 +74,6 @@ pub fn main() !void {
std.debug.print("\n排序列表后 list = ", .{});
inc.PrintUtil.printList(i32, list);
const getchar = try std.io.getStdIn().reader().readByte();
_ = getchar;
_ = try std.io.getStdIn().reader().readByte();
}

View File

@@ -6,7 +6,6 @@ const std = @import("std");
const inc = @import("include");
// 列表类简易实现
// 编译期泛型
pub fn MyList(comptime T: type) type {
return struct {
const Self = @This();
@@ -171,7 +170,6 @@ pub fn main() !void {
inc.PrintUtil.printArray(i32, try list.toArray());
std.debug.print(" ,容量 = {} ,长度 = {}\n", .{list.capacity(), list.size()});
const getchar = try std.io.getStdIn().reader().readByte();
_ = getchar;
_ = try std.io.getStdIn().reader().readByte();
}