-
Notifications
You must be signed in to change notification settings - Fork 96
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
Implement read_dir function and test #257
Conversation
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've got some comments.
👍 Can someone, e.g. @jdroenner, activate the CI? |
I just realized that the test should be in |
Could you please activate CI again for this branch? |
We can't activate it directly, it's disabled for PRs in the workflow, and some convincing might be required to change that. But at least we can bors try |
tryBuild failed: |
CC #266 |
Filed #267 for the clippy error. |
Hmm, CI works now. |
We'll need your change for it to not fail though. |
Yeah, I'm just confused because the last time it didn't even show up on the page, which made me file #266. |
267: Mark `SpatialRef::from_c_obj` as unsafe r=jdroenner a=lnicola - [x] I agree to follow the project's [code of conduct](https://github.com/georust/gdal/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- See #257 (comment) Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Can you rebase? |
I was having trouble rebasing, so I merged. Should be good though. |
Oof, sorry, I missed your comment. Can you resolve the conflict, then maybe squash? It's fine if you don't, though. |
Hopefully I did that correctly. |
bors r+ |
257: Implement read_dir function and test r=lnicola a=Barugon Implement a `gdal::vsi::read_dir` function and test. - [x] I agree to follow the project's [code of conduct](https://github.com/georust/gdal/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Co-authored-by: Barugon <barugon@dungeonbox.net>
Almost, except the commit message 😅. |
bors r- |
Canceled. |
Sorry, I missed this, @ChristianBeilschmidt had a good question up there. |
Which comment? AFAIK, everything was resolved. |
src/vsi.rs
Outdated
@@ -28,7 +28,14 @@ fn _read_dir(path: &Path, recursive: bool) -> Result<Vec<String>> { | |||
data | |||
}; | |||
|
|||
Ok(_string_array(data)) | |||
let strings = _string_array(data); |
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.
We can do it in a later PR, but you could add _pathbuf
and _pathbuf_array
functions to avoid the reallocation here.
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.
It's getting late here. Let me do that tomorrow.
I'm sorry if I blocked this. I guess my comments were resolved. |
src/utils.rs
Outdated
where | ||
F: Fn(*const c_char) -> R, | ||
{ | ||
let mut ret_val: Vec<R> = 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.
Is there a reason that this couldn't just be let mut ret_val = Vec::new();
?
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.
Probably not
bors r+ |
Build succeeded: |
Implement a
gdal::vsi::read_dir
function and test.CHANGES.md
if knowledge of this change could be valuable to users.