Skip to content

Commit 0129593

Browse files
committed
fix bug
1 parent 38fbeb0 commit 0129593

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub async fn get_all_ipv4() -> Result<Vec<String>, Box<dyn std::error::Error>> {
99
let file = std::fs::File::open("cloudflare_ipv4.txt").unwrap();
1010
let mut reader: std::io::BufReader<std::fs::File> = std::io::BufReader::new(file);
1111
reader.read_to_string(&mut cidr_strings).unwrap();
12-
let cidr_list = cidr_strings.split("\n");
12+
let cidr_list = cidr_strings.lines();
1313
let mut ipv4_addresses = Vec::<String>::new();
1414
for cidr in cidr_list {
1515
let network: Ipv4Network = cidr.parse().unwrap();

0 commit comments

Comments
 (0)