From 746fe47e946cf7a3b084d10e8b045d246a4cd0a9 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 4 Mar 2021 15:07:13 +0200 Subject: [PATCH] docs: add missing User and Post declarations in the Generics example --- doc/docs.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/docs.md b/doc/docs.md index 2681c014e0..f18f7c6a54 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -2462,6 +2462,18 @@ struct Repo { db DB } +struct User { + id int + name string +} + +struct Post { + id int + user_id int + title string + body string +} + fn new_repo(db DB) Repo { return Repo{db: db} }