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

@@ -5,7 +5,6 @@
const std = @import("std");
// Definition for a singly-linked list node
// 编译期泛型
pub fn ListNode(comptime T: type) type {
return struct {
const Self = @This();

View File

@@ -60,7 +60,7 @@ pub fn printQueue(comptime T: type, queue: std.TailQueue(T)) void {
}
}
// Print a HashMap
// Print a hash map
pub fn printHashMap(comptime TKey: type, comptime TValue: type, map: std.AutoHashMap(TKey, TValue)) void {
var it = map.iterator();
while (it.next()) |kv| {

View File

@@ -5,7 +5,6 @@
const std = @import("std");
// Definition for a binary tree node
// 编译期泛型
pub fn TreeNode(comptime T: type) type {
return struct {
const Self = @This();