MCPcopy Create free account
hub / github.com/RustCrypto/utils / clone

Method clone

block-buffer/src/lib.rs:111–115  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

109impl<BS: BlockSizes, K: BufferKind> Clone for BlockBuffer<BS, K> {
110 #[inline]
111 fn clone(&self) -> Self {
112 // SAFETY: `BlockBuffer` does not implement `Drop` (i.e. it could be a `Copy` type),
113 // so we can safely clone it using `ptr::read`.
114 unsafe { ptr::read(self) }
115 }
116}
117
118impl<BS: BlockSizes, K: BufferKind> fmt::Debug for BlockBuffer<BS, K> {

Callers 1

test_eager_paddingsFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_eager_paddingsFunction · 0.36