From 37657367902b3e53359b48aed97c220bfddb12b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 22 Feb 2021 21:21:01 +0200 Subject: [PATCH] Make clippy happy --- examples/read_write_ogr_datetime.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/read_write_ogr_datetime.rs b/examples/read_write_ogr_datetime.rs index c6bbd486..9bcb212f 100644 --- a/examples/read_write_ogr_datetime.rs +++ b/examples/read_write_ogr_datetime.rs @@ -1,7 +1,5 @@ -use gdal::errors::Result; - #[cfg(feature = "datetime")] -fn run() -> Result<()> { +fn run() -> gdal::errors::Result<()> { use chrono::Duration; use gdal::vector::{Defn, Feature, FieldDefn, FieldValue}; use gdal::{Dataset, Driver}; @@ -60,11 +58,13 @@ fn run() -> Result<()> { } #[cfg(not(feature = "datetime"))] -fn run() -> Result<()> { +fn run() { println!("gdal crate was build without datetime support"); - Ok(()) } fn main() { + #[cfg(feature = "datetime")] run().unwrap(); + #[cfg(not(feature = "datetime"))] + run(); }