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:
Philipp Schuster
2025-06-17 12:37:13 +02:00
committed by Rob Bradford
parent 3864230430
commit b8be33dff7
2 changed files with 3 additions and 3 deletions

View File

@@ -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)]