Fix formatting to 120 lines
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
max_width = 120
|
||||||
+6
-9
@@ -62,9 +62,7 @@ impl Nick {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self { name: nick.to_string() })
|
||||||
name: nick.to_string(),
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,12 +154,11 @@ impl Config {
|
|||||||
|
|
||||||
// TODO: Also consider \r and \r\n
|
// TODO: Also consider \r and \r\n
|
||||||
if b == b'\n' {
|
if b == b'\n' {
|
||||||
let key_str = String::from_utf8(take(&mut key))
|
let key_str =
|
||||||
.map_err(|e| error::map_config_error_utf8(&e, line_number))?;
|
String::from_utf8(take(&mut key)).map_err(|e| error::map_config_error_utf8(&e, line_number))?;
|
||||||
let value_str = String::from_utf8(take(&mut value))
|
let value_str =
|
||||||
.map_err(|e| error::map_config_error_utf8(&e, line_number))?;
|
String::from_utf8(take(&mut value)).map_err(|e| error::map_config_error_utf8(&e, line_number))?;
|
||||||
let mac = Mac::create(&value_str)
|
let mac = Mac::create(&value_str).map_err(|e| error::map_config_error(&e, line_number))?;
|
||||||
.map_err(|e| error::map_config_error(&e, line_number))?;
|
|
||||||
|
|
||||||
let nick = Nick { name: key_str };
|
let nick = Nick { name: key_str };
|
||||||
if nick_map.contains_key(&nick) {
|
if nick_map.contains_key(&nick) {
|
||||||
|
|||||||
+1
-4
@@ -93,9 +93,6 @@ mod tests {
|
|||||||
50, 26, 255, 62, 16, 239,
|
50, 26, 255, 62, 16, 239,
|
||||||
];
|
];
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(magic_bytes, expected, "Magic bytes are not created correctly");
|
||||||
magic_bytes, expected,
|
|
||||||
"Magic bytes are not created correctly"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user