Skip to content

Instantly share code, notes, and snippets.

View connorskees's full-sized avatar
🦆
chr(127752)

Connor Skees connorskees

🦆
chr(127752)
View GitHub Profile
#[inline]
fn memcpy(
out_slice: &mut [u8],
base: &[u8],
) {
let chunk_size = base.len();
let mut chunks = out_slice.chunks_exact_mut(chunk_size);
while let Some(chunk) = chunks.next() {
chunk.copy_from_slice(base);
// Copyright 2022 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// https://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,