Skip to content
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

glib: Optimize IntoGStr impl for String by simply appending a NUL-byte #1016

Merged
merged 1 commit into from Feb 20, 2023

Conversation

sdroege
Copy link
Member

@sdroege sdroege commented Feb 20, 2023

No description provided.

sdroege referenced this pull request in Lyude/neovim-gtk Feb 20, 2023
`String` implements `IntoGStr`. So the dereference is not necessary
here.

```
warning: the borrowed expression implements the required traits
  --> src/shell_dlg.rs:77:9
   |
77 |         &format!("Save changes to '{changed_files}'?"),
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("Save changes to '{changed_files}'?")`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `#[warn(clippy::needless_borrow)]` on by default

warning: `nvim-gtk` (bin "nvim-gtk") generated 1 warning (run `cargo clippy --fix --bin "nvim-gtk"` to apply 1 suggestion)
```
@sdroege sdroege added the needs-backport PR needs backporting to the current stable branch label Feb 20, 2023
@GuillaumeGomez
Copy link
Member

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 8bf3a36 into gtk-rs:master Feb 20, 2023
@pbor pbor added backported PR was backported to the current stable branch and removed needs-backport PR needs backporting to the current stable branch labels Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported PR was backported to the current stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants