mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
net_util: tap: remove needless copy
One can call `to_vec()` anyway if one needs an owned copy. This change further helps to prevent needless copies in upcoming changes. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
3864230430
commit
b8be33dff7
@@ -481,8 +481,8 @@ impl Tap {
|
||||
ifreq
|
||||
}
|
||||
|
||||
pub fn get_if_name(&self) -> Vec<u8> {
|
||||
self.if_name.clone()
|
||||
pub fn get_if_name(&self) -> &[u8] {
|
||||
&self.if_name
|
||||
}
|
||||
|
||||
#[cfg(fuzzing)]
|
||||
|
||||
Reference in New Issue
Block a user