mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-07 03:16:23 +00:00
network-api: drop unnecessary string allocations
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
52cf0c05f5
commit
a3c1d9d456
@ -604,11 +604,9 @@ mod tests {
|
|||||||
};
|
};
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
String::try_from(nw_config).unwrap().trim(),
|
String::try_from(nw_config).unwrap().trim(),
|
||||||
r#"
|
"\
|
||||||
iface enp3s0 inet static
|
iface enp3s0 inet static
|
||||||
address 10.0.0.100/16"#
|
address 10.0.0.100/16"
|
||||||
.to_string()
|
|
||||||
.trim()
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -628,12 +626,10 @@ iface enp3s0 inet static
|
|||||||
};
|
};
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
String::try_from(nw_config).unwrap().trim(),
|
String::try_from(nw_config).unwrap().trim(),
|
||||||
r#"
|
"\
|
||||||
iface enp3s0 inet static
|
iface enp3s0 inet static
|
||||||
address 10.0.0.100/16
|
address 10.0.0.100/16
|
||||||
gateway 10.0.0.1"#
|
gateway 10.0.0.1"
|
||||||
.to_string()
|
|
||||||
.trim()
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user