From 187028562b3f91d8b912b616aa2c222bdaeb0494 Mon Sep 17 00:00:00 2001 From: mikysett Date: Mon, 10 Oct 2022 16:51:51 +0100 Subject: [PATCH] docs(circle): improve functions prototypes consistency --- subjects/circle/README.md | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/subjects/circle/README.md b/subjects/circle/README.md index c45ab8e7..01702757 100644 --- a/subjects/circle/README.md +++ b/subjects/circle/README.md @@ -23,31 +23,23 @@ Create the structures `Circle` and `Point`. You'll need to create the necessary This snippets are incomplete, you'll need to complete them. You'll find some useful information in the [usage](#usage). ```rust +#[derive(Debug)] pub struct Circle { - center //.. - radius //.. + pub center //.. + pub radius //.. } -struct Point { -// ... +impl Circle { + // ... } -// Point -fn distance(p1, p2) -> _ { - -} - -// Circle -fn new(x: f64, y: f64, radius: f64) -> Circle { -} - -fn diameter(_) -> _ { -} - -fn area() -> _ { +#[derive(Debug)] +pub struct Point { + // ... } -fn intersect(self, other: ) -> bool { +impl Point { + // ... } ```