From 6aa7aa8ebc677f28507cd5cf0bdd95c5234c3df9 Mon Sep 17 00:00:00 2001 From: Evaldas Buinauskas Date: Mon, 20 Nov 2023 11:52:34 +0200 Subject: [PATCH 1/2] Remove private_in_public lint --- src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 2b98c2e..edba7bc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -80,7 +80,6 @@ overflowing_literals, path_statements, patterns_in_fns_without_body, - private_in_public, trivial_casts, trivial_numeric_casts, unconditional_recursion, From 01db4905a49dda936297690d7aa5747fd1a378b1 Mon Sep 17 00:00:00 2001 From: Evaldas Buinauskas Date: Mon, 20 Nov 2023 11:54:28 +0200 Subject: [PATCH 2/2] Fix clippy::needless_doctest_main lint --- src/lib.rs | 54 ++++++++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index edba7bc..2d8ccfb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,34 +27,32 @@ //! ```rust //! use elasticsearch_dsl::*; //! -//! fn main() { -//! let query = Search::new() -//! .source(false) -//! .stats("statistics") -//! .from(0) -//! .size(30) -//! .query( -//! Query::bool() -//! .must(Query::multi_match( -//! ["title", "description"], -//! "you know, for search", -//! )) -//! .filter(Query::terms("tags", ["elasticsearch"])) -//! .should(Query::term("verified", true).boost(10)), -//! ) -//! .aggregate( -//! "country_ids", -//! Aggregation::terms("country_id") -//! .aggregate("catalog_ids", Aggregation::terms("catalog_id")) -//! .aggregate("company_ids", Aggregation::terms("company_id")) -//! .aggregate( -//! "top1", -//! Aggregation::top_hits() -//! .size(1) -//! .sort(FieldSort::ascending("user_id")), -//! ), -//! ).rescore(Rescore::new(Query::term("field", 1)).query_weight(1.2)); -//! } +//! let query = Search::new() +//! .source(false) +//! .stats("statistics") +//! .from(0) +//! .size(30) +//! .query( +//! Query::bool() +//! .must(Query::multi_match( +//! ["title", "description"], +//! "you know, for search", +//! )) +//! .filter(Query::terms("tags", ["elasticsearch"])) +//! .should(Query::term("verified", true).boost(10)), +//! ) +//! .aggregate( +//! "country_ids", +//! Aggregation::terms("country_id") +//! .aggregate("catalog_ids", Aggregation::terms("catalog_id")) +//! .aggregate("company_ids", Aggregation::terms("company_id")) +//! .aggregate( +//! "top1", +//! Aggregation::top_hits() +//! .size(1) +//! .sort(FieldSort::ascending("user_id")), +//! ), +//! ).rescore(Rescore::new(Query::term("field", 1)).query_weight(1.2)); //! ``` //! //! See examples for more.