From fc3acb970267406c05e29ef561618778b1245895 Mon Sep 17 00:00:00 2001 From: Mateo Date: Sat, 7 Sep 2024 18:19:02 +0200 Subject: [PATCH] docs(rust): fix formatting on functions content page (#7027) --- .../content/101-language-basics/100-syntax/103-functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/roadmaps/rust/content/101-language-basics/100-syntax/103-functions.md b/src/data/roadmaps/rust/content/101-language-basics/100-syntax/103-functions.md index 7beeab508..a30719ae8 100644 --- a/src/data/roadmaps/rust/content/101-language-basics/100-syntax/103-functions.md +++ b/src/data/roadmaps/rust/content/101-language-basics/100-syntax/103-functions.md @@ -1,4 +1,4 @@ - Functions and Method Syntax +# Functions and Method Syntax In Rust, functions are declared using the `fn` keyword. Each function can take a set of input variables with their specified types, and may return data of a specified type. The body of a function is contained within curly braces `{}`. Unlike other languages, in Rust, you don't need to end the last statement in a block with a semicolon; omitting the last semicolon of a block in this way turns the last statement into an expression, and the result of this expression becomes the implicit return value of the block. In other words, if we want to return a value, we simply write the expression we want to return.