Skip to content

Instantly share code, notes, and snippets.

@piedoom
Last active June 10, 2017 08:46
Show Gist options
  • Select an option

  • Save piedoom/243d691a932269e5e9d7d7f9163a1a8d to your computer and use it in GitHub Desktop.

Select an option

Save piedoom/243d691a932269e5e9d7d7f9163a1a8d to your computer and use it in GitHub Desktop.
// READ: using this external library struct -
//
// https://github.com/overdrivenpotato/rust-vst2/blob/master/src/buffer.rs#L78
//
//----------------------------------
// I have a simple function:
fn render_next(&self, buffer: &AudioBuffer<F>) {
let &(ref inputs, ref outputs) = &buffer.split();
// Error: cannot move out of borrowed content
// Confused about this error - aren't I staying within the borrowed content by using a reference?
// I noticed the `split` function takes `self`, and not `&self`. Is this the problem? If so,
// why is it not &self?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment