[tests] Lint on Linux: the Unix client before the test module, a Target type for the fuzz table, is_multiple_of; rustfmt 1.100 layout of core::pki
This commit is contained in:
@@ -22,8 +22,11 @@ use ianitor_core::edge_config::{EdgeConfig, EdgeTls};
|
||||
use ianitor_core::share::{self, LinkSpec, Revocations, ShareId, ShareKey};
|
||||
use ianitor_core::{SourceFile, load, pki, routes};
|
||||
|
||||
/// A target's body.
|
||||
pub type Target = fn(&[u8]);
|
||||
|
||||
/// Every target, by the name its directories use.
|
||||
pub const TARGETS: &[(&str, fn(&[u8]))] = &[
|
||||
pub const TARGETS: &[(&str, Target)] = &[
|
||||
("routes", routes_toml),
|
||||
("header_rules", header_rules),
|
||||
("share_token", share_token),
|
||||
|
||||
@@ -17,7 +17,7 @@ fn from_hex(raw: &[u8]) -> Option<Vec<u8>> {
|
||||
.copied()
|
||||
.filter(|c| !c.is_ascii_whitespace())
|
||||
.collect();
|
||||
if digits.len() % 2 != 0 {
|
||||
if !digits.len().is_multiple_of(2) {
|
||||
return None;
|
||||
}
|
||||
digits
|
||||
|
||||
Reference in New Issue
Block a user