Skip to content

Commit

Permalink
Fixed formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
metasim committed Jun 13, 2022
1 parent d6fdd6a commit 655feb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/vector/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,10 @@ impl Geometry {
/// Get a reference to the geometry at given `index`
pub fn get_geometry(&self, index: usize) -> GeometryRef {
let geom = unsafe { self.get_unowned_geometry(index) };
GeometryRef { geom, _lifetime: PhantomData::default() }
GeometryRef {
geom,
_lifetime: PhantomData::default(),
}
}

pub fn add_geometry(&mut self, mut sub: Geometry) -> Result<()> {
Expand Down Expand Up @@ -455,7 +458,7 @@ pub fn geometry_type_to_name(ty: OGRwkbGeometryType::Type) -> String {
/// Reference to owned geometry
pub struct GeometryRef<'a> {
geom: Geometry,
_lifetime: PhantomData<&'a ()>
_lifetime: PhantomData<&'a ()>,
}

impl Deref for GeometryRef<'_> {
Expand Down
2 changes: 1 addition & 1 deletion src/vector/vector_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ where

#[cfg(test)]
mod tests {
use gdal_sys::OGRwkbGeometryType::{wkbLinearRing, wkbLineString, wkbPolygon};
use super::*;
use crate::errors::{GdalError, Result};
use gdal_sys::OGRwkbGeometryType::{wkbLineString, wkbLinearRing, wkbPolygon};

#[test]
fn test_feature_count() {
Expand Down

0 comments on commit 655feb5

Please sign in to comment.