Skip to content

Commit

Permalink
Removed unnecessary variables occupying memory
Browse files Browse the repository at this point in the history
  • Loading branch information
tenqz committed Jan 9, 2024
1 parent 2c14332 commit d3a6f5f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "graburl"
description = "Get all url's from website"
authors = ["tenqz"]
version = "0.1.7"
version = "0.1.8"
edition = "2021"
rust-version = "1.72.0"
repository = "https://github.com/tenqz/graburl"
Expand Down
6 changes: 2 additions & 4 deletions src/grabber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ impl Grabber {
}

pub fn show_all_urls(&self) -> Vec<String> {
let response = self.get_html();
let mut parser = Parser::new(response);
let links = parser.parse_links();
let mut parser = Parser::new(self.get_html());
let mut full_links = Vec::new();

for link in links {
for link in parser.parse_links() {
if Link::new(link.clone()).is_local_link() {
full_links.push(format!("{}", link));
} else {
Expand Down

0 comments on commit d3a6f5f

Please sign in to comment.