Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign value directly for newly created node in BinarySearchTree::insert. #672

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

iamlockon
Copy link
Contributor

@iamlockon iamlockon commented Feb 6, 2024

Description

Not sure if it's a too tiny pick. Change the tree node value assignment to be inline.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I ran bellow commands using the latest version of rust nightly.
  • I ran cargo clippy --all -- -D warnings just before my last commit and fixed any issue that was found.
  • I ran cargo fmt just before my last commit.
  • I ran cargo test just before my last commit and all tests passed.
  • I added my algorithm to the corresponding mod.rs file within its own folder, and in any parent folder(s).
  • I added my algorithm to DIRECTORY.md with the correct link.
  • I checked COUNTRIBUTING.md and my code follows its guidelines.

Copy link
Member

@vil02 vil02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely spotted!

@vil02 vil02 changed the title [Binary Search Tree] Assign value for node insert method inline Assign value directly for newly created node in BinarySearchTree::insert. Feb 6, 2024
@vil02 vil02 merged commit 72dbb04 into TheAlgorithms:master Feb 6, 2024
4 checks passed
@iamlockon iamlockon deleted the bst-improvement branch February 7, 2024 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants