clippy: replace transmute with &*
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
		@ -194,7 +194,7 @@ impl IndexFile for DynamicIndexReader {
 | 
			
		||||
        if pos >= self.index.len() {
 | 
			
		||||
            None
 | 
			
		||||
        } else {
 | 
			
		||||
            Some(unsafe { std::mem::transmute(self.chunk_digest(pos).as_ptr()) })
 | 
			
		||||
            Some(unsafe { &*(self.chunk_digest(pos).as_ptr() as *const [u8; 32]) })
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -166,7 +166,7 @@ impl IndexFile for FixedIndexReader {
 | 
			
		||||
        if pos >= self.index_length {
 | 
			
		||||
            None
 | 
			
		||||
        } else {
 | 
			
		||||
            Some(unsafe { std::mem::transmute(self.index.add(pos * 32)) })
 | 
			
		||||
            Some(unsafe { &*(self.index.add(pos * 32) as *const [u8; 32]) })
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user