From 31553316de81bbc65b626ceca639d06e02fc13b6 Mon Sep 17 00:00:00 2001 From: nassersaazi Date: Fri, 15 Apr 2022 02:50:55 +0300 Subject: [PATCH] Improve documentation This change aims to improve on the grammar in the comments. I also adjusted the Personal Goals link in the README to match the order in the detailed section. These are not very critical changes. As a newbie to Rust,the goal for me here is to get familiar with the project as I find it particularly interesting :) --- README.md | 6 +++--- src/lib.rs | 40 ++++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index eeab827..b0a21dd 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ ## Table of Contents -- [Personal Goals](#Personal-Goals) - [About](#About) +- [Personal Goals](#Personal-Goals) - [Quick Start](#Quick-Start) - [License](#License) - [Contributing](#Contributing) @@ -34,7 +34,7 @@ I have made this library with the personal goals of learning and solidifying con , `generics` and `lifetimes`. I cannot promise that the implementations are particularly efficient, or if they are, it was not at the forefront of my mind. -That being said, there are some areas I would love to improve upon/include: +That being said, there are some areas I would love to improve upon which include: - [ ] Write idiomatic code. - [ ] Effectively use **macro_rules!** to reduce large portions of repetitive code. @@ -137,4 +137,4 @@ Please read the [CONTRIBUTING.md](CONTRIBUTING.md) before contributing! (Thank y The book [Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.github.io/too-many-lists/) inspired me to try and implement Binary Search Trees within the language. I had also been wanting to create my first library for -other crates to use. \ No newline at end of file +other crates to use. diff --git a/src/lib.rs b/src/lib.rs index 6decc50..6d609d3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ //! as **ownership**, **borrowing**, **generics** and **lifetimes**. I cannot promise that the implementations are //! particularly efficient, or if they are, it was not at the forefront of my mind. //! -//! That being said, there are some areas I would love to improve upon/include: +//! That being said, there are some areas I would love to improve upon which include: //! - Write idiomatic code. //! - Effectively use **macro_rules!** to reduce large portions of repetitive code. //! - Implement a **pretty_print()** function to display the binary search trees nicely. @@ -236,7 +236,7 @@ pub trait BinarySearchTree { /// /// # Important /// - /// This is function is analogous to [in_order_vec](Self::in_order_vec()) as the underlying + /// This function is analogous to [in_order_vec](Self::in_order_vec()) as the underlying /// behaviour is **_exactly the same_.** fn asc_order_vec(&self) -> Vec<&T>; @@ -259,7 +259,7 @@ pub trait BinarySearchTree { /// /// # Important /// - /// This is function is analogous to [asc_order_vec](Self::asc_order_vec()) as the underlying + /// This function is analogous to [asc_order_vec](Self::asc_order_vec()) as the underlying /// behaviour is **_exactly the same_.** /// /// # Example @@ -309,7 +309,7 @@ pub trait BinarySearchTree { /// /// # Important /// - /// This is function is analogous to [in_order_iter](Self::in_order_iter()) as the underlying + /// This function is analogous to [in_order_iter](Self::in_order_iter()) as the underlying /// behaviour is **_exactly the same_.** fn asc_order_iter(&self) -> IntoIter<&T>; @@ -320,7 +320,7 @@ pub trait BinarySearchTree { /// /// # Important /// - /// This is function is analogous to [asc_order_iter](Self::asc_order_iter()) as the underlying + /// This function is analogous to [asc_order_iter](Self::asc_order_iter()) as the underlying /// behaviour is **_exactly the same_.** fn in_order_iter(&self) -> IntoIter<&T>; @@ -334,7 +334,7 @@ pub trait BinarySearchTree { /// /// # Important /// - /// This is function is analogous to [into_in_order_iter](Self::into_in_order_iter()) as the + /// This function is analogous to [into_in_order_iter](Self::into_in_order_iter()) as the /// underlying behaviour is **_exactly the same_.** fn into_asc_order_iter(self) -> IntoIter; @@ -345,7 +345,7 @@ pub trait BinarySearchTree { /// /// # Important /// - /// This is function is analogous to [into_asc_order_iter](Self::into_asc_order_iter()) as the + /// This function is analogous to [into_asc_order_iter](Self::into_asc_order_iter()) as the /// underlying behaviour is **_exactly the same_.** fn into_in_order_iter(self) -> IntoIter; @@ -767,7 +767,7 @@ impl BinarySearchTree for IterativeBST { /// /// # Important /// - /// This is function is analogous to [IterativeBST::in_order_vec()] as the underlying + /// This function is analogous to [IterativeBST::in_order_vec()] as the underlying /// behaviour is **_exactly the same_.** /// /// # Example @@ -823,7 +823,7 @@ impl BinarySearchTree for IterativeBST { /// /// # Important /// - /// This is function is analogous to [IterativeBST::asc_order_vec()] as the underlying + /// This function is analogous to [IterativeBST::asc_order_vec()] as the underlying /// behaviour is **_exactly the same_.** /// /// # Example @@ -915,7 +915,7 @@ impl BinarySearchTree for IterativeBST { /// /// # Important /// - /// This is function is analogous to [IterativeBST::in_order_iter()] as the underlying + /// This function is analogous to [IterativeBST::in_order_iter()] as the underlying /// behaviour is **_exactly the same_.** /// /// # Example @@ -974,7 +974,7 @@ impl BinarySearchTree for IterativeBST { /// /// # Important /// - /// This is function is analogous to [IterativeBST::asc_order_iter()] as the underlying + /// This function is analogous to [IterativeBST::asc_order_iter()] as the underlying /// behaviour is **_exactly the same_.** /// /// # Example @@ -1060,7 +1060,7 @@ impl BinarySearchTree for IterativeBST { /// /// # Important /// - /// This is function is analogous to [IterativeBST::into_in_order_iter()] as the + /// This function is analogous to [IterativeBST::into_in_order_iter()] as the /// underlying behaviour is **_exactly the same_.** /// /// # Example @@ -1123,7 +1123,7 @@ impl BinarySearchTree for IterativeBST { /// /// # Important /// - /// This is function is analogous to [IterativeBST::asc_order_iter()] as the + /// This function is analogous to [IterativeBST::asc_order_iter()] as the /// underlying behaviour is **_exactly the same_.** /// /// # Example @@ -1630,7 +1630,7 @@ impl BinarySearchTree for RecursiveBST { /// /// # Important /// - /// This is function is analogous to [RecursiveBST::in_order_vec()] as the underlying + /// This function is analogous to [RecursiveBST::in_order_vec()] as the underlying /// behaviour is **_exactly the same_.** /// /// # Example @@ -1690,7 +1690,7 @@ impl BinarySearchTree for RecursiveBST { /// /// # Important /// - /// This is function is analogous to [RecursiveBST::asc_order_vec()] as the underlying + /// This function is analogous to [RecursiveBST::asc_order_vec()] as the underlying /// behaviour is **_exactly the same_.** /// /// # Example @@ -1788,7 +1788,7 @@ impl BinarySearchTree for RecursiveBST { /// /// # Important /// - /// This is function is analogous to [RecursiveBST::in_order_iter()] as the underlying + /// This function is analogous to [RecursiveBST::in_order_iter()] as the underlying /// behaviour is **_exactly the same_.** /// /// # Example @@ -1851,7 +1851,7 @@ impl BinarySearchTree for RecursiveBST { /// /// # Important /// - /// This is function is analogous to [RecursiveBST::asc_order_iter()] as the underlying + /// This function is analogous to [RecursiveBST::asc_order_iter()] as the underlying /// behaviour is **_exactly the same_.** /// /// # Example @@ -1943,7 +1943,7 @@ impl BinarySearchTree for RecursiveBST { /// /// # Important /// - /// This is function is analogous to [RecursiveBST::into_in_order_iter()] as the + /// This function is analogous to [RecursiveBST::into_in_order_iter()] as the /// underlying behaviour is **_exactly the same_.** /// /// # Example @@ -2008,7 +2008,7 @@ impl BinarySearchTree for RecursiveBST { /// /// # Important /// - /// This is function is analogous to [RecursiveBST::asc_order_iter()] as the + /// This function is analogous to [RecursiveBST::asc_order_iter()] as the /// underlying behaviour is **_exactly the same_.** /// /// # Example @@ -2101,4 +2101,4 @@ impl BinarySearchTree for RecursiveBST { Node::recursive_consume_level_order_vec(self.root, &mut elements); elements.into_iter() } -} \ No newline at end of file +}