mirror of
https://github.com/NLnetLabs/dnst.git
synced 2026-09-25 11:15:01 +02:00
Review feedback: Use let ... map_err.
This commit is contained in:
@@ -194,12 +194,7 @@ impl SignZone {
|
||||
}
|
||||
let mut records = SortedRecords::new();
|
||||
for entry in reader {
|
||||
let Ok(entry) = entry else {
|
||||
return Err(Error::from(format!(
|
||||
"Invalid zone file: {}",
|
||||
entry.unwrap_err()
|
||||
)));
|
||||
};
|
||||
let entry = entry.map_err(|err| format!("Invalid zone file: {err}"))?;
|
||||
match entry {
|
||||
Entry::Record(record) => {
|
||||
let record: StoredRecord = record.flatten_into();
|
||||
|
||||
Reference in New Issue
Block a user