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

Add Feature::unset_field #503

Merged
merged 1 commit into from
Dec 23, 2023
Merged

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Dec 22, 2023

  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

@lnicola
Copy link
Member Author

lnicola commented Dec 22, 2023

r? @metasim

/// See: [`OGRFeature::UnsetField`][UnsetField]
///
/// [UnsetField]: https://gdal.org/api/ogrfeature_cpp.html#_CPPv4N10OGRFeature10UnsetFieldEi
pub fn unset_field(&self, field_name: &str) -> Result<()> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that should be (same for set_field_null())

Suggested change
pub fn unset_field(&self, field_name: &str) -> Result<()> {
pub fn unset_field(&mut self, field_name: &str) -> Result<()> {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should, but all of these currently take &self for some reason and @metasim ran into some issues when trying to change them to &mut self.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's #499. I think it should work, but didn't try it yet.

@lnicola lnicola merged commit f435e40 into georust:master Dec 23, 2023
9 checks passed
@lnicola lnicola deleted the feature-unset-field branch December 23, 2023 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants