2020-12-15から1日間の記事一覧

Rust 親子関係を持つレコードを木構造に変換する

以下のような親子(id -> parent)関係のあるレコードを、 [ { id: "1", parent: "", name: "/", path: "/", child_count: 0, depth: 1 }, { id: "2", parent: "1", name: "home", path: "/home/", child_count: 0, depth: 2 }, { id: "3", parent: "2", name:…