MCPcopy Create free account
hub / github.com/git/git / as_mut_slice

Method as_mut_slice

src/hash.rs:72–77  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

70 }
71
72 pub fn as_mut_slice(&mut self) -> Result<&mut [u8], InvalidHashAlgorithm> {
73 match HashAlgorithm::from_u32(self.algo) {
74 Some(algo) => Ok(&mut self.hash[0..algo.raw_len()]),
75 None => Err(InvalidHashAlgorithm(self.algo)),
76 }
77 }
78}
79
80impl Display for ObjectID {

Callers

nothing calls this directly

Calls 2

raw_lenMethod · 0.80

Tested by

no test coverage detected