Skip to content

Commit

Permalink
Merge pull request #452 from Chia-Network/fix_newline_bug
Browse files Browse the repository at this point in the history
Swap to .lines().next() instead of .split_once('\n')
  • Loading branch information
matt-o-how committed Apr 2, 2024
2 parents dd1d1e1 + 47398ff commit 0f08b67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/clvm-utils/src/tree_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ fn test_tree_hash_cached(
let filename = format!("../../generator-tests/{name}.txt");
println!("file: {filename}",);
let test_file = read_to_string(filename).expect("test file not found");
let (generator, _) = test_file.split_once('\n').expect("invalid test file");
let generator = test_file.lines().next().expect("invalid test file");
let generator = hex::decode(generator).expect("invalid hex encoded generator");

let generator = if compressed {
Expand Down

0 comments on commit 0f08b67

Please sign in to comment.