From de7e660313bb6e42f2eb056f7a1bf19b9790589e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 8 Aug 2019 13:55:40 +0200 Subject: [PATCH] tantivy: Disable a clippy warning about new not returning self. The new() method using pyo3 does not return self, pyo3 handles some python magic for us instead. Disable the clippy warning about not returning self in new since it does not apply to us. --- src/document.rs | 2 ++ src/index.rs | 2 ++ src/schemabuilder.rs | 2 ++ src/searcher.rs | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/document.rs b/src/document.rs index 72a19cc..af8115c 100644 --- a/src/document.rs +++ b/src/document.rs @@ -1,3 +1,5 @@ +#![allow(clippy::new_ret_no_self)] + use pyo3::prelude::*; use pyo3::types::PyDateTime; use pyo3::types::{PyDateAccess, PyTimeAccess}; diff --git a/src/index.rs b/src/index.rs index fdc90b0..b3fa7b2 100644 --- a/src/index.rs +++ b/src/index.rs @@ -1,3 +1,5 @@ +#![allow(clippy::new_ret_no_self)] + use pyo3::exceptions; use pyo3::prelude::*; diff --git a/src/schemabuilder.rs b/src/schemabuilder.rs index b915259..e44f7de 100644 --- a/src/schemabuilder.rs +++ b/src/schemabuilder.rs @@ -1,3 +1,5 @@ +#![allow(clippy::new_ret_no_self)] + use pyo3::exceptions; use pyo3::prelude::*; diff --git a/src/searcher.rs b/src/searcher.rs index 2565cb9..6d6ec0c 100644 --- a/src/searcher.rs +++ b/src/searcher.rs @@ -1,3 +1,5 @@ +#![allow(clippy::new_ret_no_self)] + use pyo3::exceptions; use pyo3::prelude::*;