Refactor code based on clippy suggestions
This commit is contained in:
@@ -25,9 +25,11 @@ pub fn read_base64_lines(path: &str) -> Vec<Bytes> {
|
||||
let br = BufReader::new(file);
|
||||
br.lines()
|
||||
.map(|line| {
|
||||
BytesBase64::from_base64(&line.expect(&format!("Failed to read line in {}", path)))
|
||||
.expect(&format!("Invalid base64 in {}", path))
|
||||
.to_bytes()
|
||||
BytesBase64::from_base64(
|
||||
&line.unwrap_or_else(|_| panic!("Failed to read line in {}", path)),
|
||||
)
|
||||
.unwrap_or_else(|_| panic!("Invalid base64 in {}", path))
|
||||
.to_bytes()
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user