Skip to content

Fix no copy when cast Snippet to DisplayList and #29 #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 4, 2020
Merged

Fix no copy when cast Snippet to DisplayList and #29 #32

merged 2 commits into from
Apr 4, 2020

Conversation

zzau13
Copy link
Contributor

@zzau13 zzau13 commented Apr 3, 2020

With this pull request the "no copy" process is completed. All the crate is free copy 😄
I have changed from yaml to toml because yaml does not implement serde::Deserialize

@zbraniecki zbraniecki self-requested a review April 3, 2020 21:41
@zzau13
Copy link
Contributor Author

zzau13 commented Apr 4, 2020

Fixed #29

let lines = slice.source.lines();
let lines_len = lines.clone().count();
for (i, line) in lines.enumerate() {
for (line, end_line) in CursorLines::new(slice.source) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this solution!

@zzau13 zzau13 changed the title Fix no copy when cast Snippet to DisplayList Fix no copy when cast Snippet to DisplayList and #29 Apr 4, 2020
@zbraniecki
Copy link
Contributor

Looks great! Thank you!

@zbraniecki zbraniecki merged commit c66d784 into rust-lang:master Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants