Comments (4)
I think it is better to just use 'move', funny thing as that in my code i also use clone after take reference 😄 , so it looks like 'move' is better solution. Also move don't do to much copy in case of Value i think.
from neovim-lib.
This pass by ref is only to not make copy of data. As i understand move semantics it still copy some amount of stack data in case of function call. Maybe here is not big problem to use move. Only problem is that this breaks backward compatibility .
from neovim-lib.
You can see a bit of discussion here: https://www.reddit.com/r/rust/comments/79ydaa/array_of_strings_move_or_clone/
That's exactly my use case, where move is very clearly much more performant than references. Maybe there's a way to offer both variants and let the library user decide?
from neovim-lib.
Thanks for report, this helps fix number of clone problems 👍
from neovim-lib.
Related Issues (17)
- Error with large files HOT 22
- Debug logging HOT 4
- Trouble using `nvim_call_atomic` HOT 1
- Consider adding buffered reading HOT 2
- Api and Mutability/Ownership deadlock HOT 4
- Executing "echo" as a command but not pressing enter in Neovim causes neovim_lib to panic HOT 11
- New release? HOT 1
- Useful link HOT 1
- I/O error while reading marker byte: failed to fill full buffer HOT 4
- Support for Windows named pipes
- Missing UIAttachOption for ext_messages
- Mainstream this repo HOT 15
- Async/Await HOT 3
- Lib panics on `find_sender` method
- open_win not published
- scorched earth: a useless neovim plugin in rust HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neovim-lib.