Skip to content

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

Merged
zbraniecki merged 2 commits intorust-lang:masterfrom
zzau13:master
Apr 4, 2020
Merged

Fix no copy when cast Snippet to DisplayList and #29#32
zbraniecki merged 2 commits intorust-lang:masterfrom
zzau13:master

Conversation

@zzau13
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

zzau13 commented Apr 4, 2020

Fixed #29

Comment thread src/display_list/from_snippet.rs
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
Copy Markdown
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
Copy Markdown
Contributor

Looks great! Thank you!

@zbraniecki zbraniecki merged commit c66d784 into rust-lang:master Apr 4, 2020
epage added a commit to epage/annotate-snippets-rs that referenced this pull request Feb 18, 2026
> [!NOTE]
> Mend has cancelled [the proposed
renaming](https://redirect.github.com/renovatebot/renovate/discussions/37842)
of the Renovate GitHub app being renamed to `mend[bot]`.
> 
> This notice will be removed on 2025-10-07.

<hr>

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/setup-python](https://redirect.github.com/actions/setup-python)
| action | major | `v5` -> `v6` |

---

### Release Notes

<details>
<summary>actions/setup-python (actions/setup-python)</summary>

###
[`v6`](https://redirect.github.com/actions/setup-python/compare/v5...v6)

[Compare
Source](https://redirect.github.com/actions/setup-python/compare/v5...v6)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 5am on the first day of the
month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/epage/_rust).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzEuOSIsInVwZGF0ZWRJblZlciI6IjQxLjEzMS45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
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