-
Notifications
You must be signed in to change notification settings - Fork 163
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
chore: cleanup clones for upgrade/import/export file for v1.7 #1901
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## borders-rework #1901 +/- ##
==================================================
+ Coverage 90.94% 90.98% +0.03%
==================================================
Files 236 236
Lines 48371 48328 -43
==================================================
- Hits 43991 43970 -21
+ Misses 4380 4358 -22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Value::Array(crate::Array::from( | ||
values | ||
.chunks(size.w as usize) | ||
.map(|row| row.iter().map(import_cell_value).collect::<Vec<_>>()) | ||
.map(|row| { | ||
row.iter() | ||
.map(|value| import_cell_value(value.to_owned())) | ||
.collect::<Vec<_>>() | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not able to figure out how to get owned value here, row chunk is a slice
value.to_owned()
can be avoided if we can directly use owned value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed this one
@@ -79,7 +82,9 @@ pub(crate) fn export_rows_code_runs( | |||
}, | |||
values: array | |||
.rows() | |||
.flat_map(|row| row.iter().map(export_cell_value)) | |||
.flat_map(|row| { | |||
row.iter().map(|value| export_cell_value(value.to_owned())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's an easy way to avoid this one. It's possible by collecting each row into a Vec<()>
before transforming it, or by just manually building up a Vec<Vec<()>>
element-by-element in this function. The latter is the most clone-free way but it's not pretty.
No description provided.