mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 17:30:17 +00:00
fix(bls): parser should skip over empty lines and comments
This commit is contained in:
@@ -36,6 +36,11 @@ impl FromStr for BlsEntry {
|
|||||||
// Trim the line.
|
// Trim the line.
|
||||||
let line = line.trim();
|
let line = line.trim();
|
||||||
|
|
||||||
|
// Skip over empty lines and comments.
|
||||||
|
if line.is_empty() || line.starts_with('#') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Split the line once by whitespace.
|
// Split the line once by whitespace.
|
||||||
let Some((key, value)) = line.split_once(char::is_whitespace) else {
|
let Some((key, value)) = line.split_once(char::is_whitespace) else {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user