From 6c1b447f2e67f5eae89394344ade698aca3ec7e6 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Tue, 1 Oct 2019 11:55:46 +0000 Subject: Remove unneeded `fn main` blocks from docs --- src/liballoc/string.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/liballoc/string.rs') diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index abe50fdb7a3..639124e26cc 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -164,10 +164,8 @@ use crate::vec::Vec; /// /// fn example_func(example_arg: A) {} /// -/// fn main() { -/// let example_string = String::from("example_string"); -/// example_func(&example_string); -/// } +/// let example_string = String::from("example_string"); +/// example_func(&example_string); /// ``` /// /// There are two options that would work instead. The first would be to -- cgit 1.4.1-3-g733a5