Skip to content

Commit

Permalink
refactor: "".to_string() -> String::new()
Browse files Browse the repository at this point in the history
  • Loading branch information
craigmayhew committed May 22, 2024
1 parent 507dfb9 commit 09047c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/primalitytest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ pub fn check(input: String) -> Check {
pub fn listy(start_number: u64, number_of_primes: u64) -> String {
let mut i = 0;
let mut j = start_number;
let mut list: String = "".to_string();
let mut list: String = String::new();
while i < number_of_primes {
let result = check(j.to_string());
if result.is_prime == true {
Expand Down

0 comments on commit 09047c9

Please sign in to comment.