slint icon indicating copy to clipboard operation
slint copied to clipboard

add VecModel::extend_from_slice

Open radiohertz opened this issue 1 year ago • 4 comments

closes #1647

radiohertz avatar Sep 23 '22 04:09 radiohertz

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 23 '22 04:09 CLAassistant

Thanks for the PR! Since the same method in Vec is called extend_from_slice I believe it should be called the same here. Or it should take an Iterator instead of a slice, like the extend method in vec.

ogoffart avatar Sep 23 '22 06:09 ogoffart

Since the same method in Vec is called extend_from_slice I believe it should be called the same here.

@ogoffart Renamed it 👍

radiohertz avatar Sep 23 '22 07:09 radiohertz

Thanks, that's perfect.

In order to be complete, we should also have a test (maybe similar or as an extension to test_vecmodel_set_vec) , and a change log entry. Perhaps the documentation could say it is similar to Vec::extend_from_slice, with a link to the Vec's documentation.

ogoffart avatar Sep 23 '22 10:09 ogoffart

@idipot Would you be up for adding a test and a changelog entry? No problem if you're busy, then I can also do that :)

tronical avatar Sep 30 '22 12:09 tronical

@idipot Would you be up for adding a test and a changelog entry? No problem if you're busy, then I can also do that :)

Hi, i was on vacation. I'll add a test and the changelog entry 👍

radiohertz avatar Oct 06 '22 10:10 radiohertz

Thanks for your contribution. I'm just merging this and I'll write the test in a followup commit.

ogoffart avatar Oct 17 '22 12:10 ogoffart