]> git.proxmox.com Git - pxar.git/commitdiff
prelude: drop OsStr implementation
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 10 Jun 2024 11:35:17 +0000 (13:35 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 10 Jun 2024 11:35:17 +0000 (13:35 +0200)
this was leftover and not does not make sense with the current version of the
Prelude, which is an opaque blob of bytes.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/format/mod.rs

index a952c40f632d3bb0ffa2fc3653f649a82e67cc4b..4107fa71ba1b904db8dd518682bd99b3d28be9b6 100644 (file)
@@ -720,24 +720,12 @@ pub struct Prelude {
     pub data: Vec<u8>,
 }
 
-impl Prelude {
-    pub fn as_os_str(&self) -> &OsStr {
-        self.as_ref()
-    }
-}
-
 impl AsRef<[u8]> for Prelude {
     fn as_ref(&self) -> &[u8] {
         &self.data
     }
 }
 
-impl AsRef<OsStr> for Prelude {
-    fn as_ref(&self) -> &OsStr {
-        OsStr::from_bytes(&self.data[..self.data.len().max(1) - 1])
-    }
-}
-
 #[cfg(all(test, target_os = "linux"))]
 #[test]
 fn test_linux_devices() {