Created
March 2, 2017 20:21
-
-
Save federicomenaquintero/8106cd276d78e90ec9e282c85c786ca1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn emit_marker_at_start_of_segment<E> (some args..., | |
emit_fn: E) where E: Fn(MarkerType, f64, f64, f64) { ... } | |
fn emit_markers_for_path_builder<E> (builder: &RsvgPathBuilder, | |
emit_fn: E) where E: Fn(MarkerType, f64, f64, f64) { | |
for ... { | |
... multiple calls to functions which take in emit_fn ... | |
emit_marker_at_start_of_segment (..., emit_fn); | |
} | |
} | |
error[E0382]: use of moved value: `emit_fn` | |
--> marker.rs:710:137 | |
| | |
710 | emit_marker_at_end_of_segment (&segments[i - 1], MarkerType::End, angle_from_vector (incoming_vx, incoming_vy), emit_fn); | |
| ^^^^^^^ value moved here in previous iteration of loop | |
| | |
= note: move occurs because `emit_fn` has type `E`, which does not implement the `Copy` trait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment