apollographql / apollo-rs

Spec compliant GraphQL Tools in Rust.
Apache License 2.0
574 stars 45 forks source link

Fix new lints in Clippy 1.79 #869

Closed SimonSapin closed 4 months ago

SimonSapin commented 4 months ago
warning: needless `fn main` in doctest
   --> crates/apollo-compiler/src/../README.md:95:1
    |
95  | / use apollo_compiler::{Schema, ExecutableDocument, Node, executable};
96  | |
97  | | fn main() {
98  | |     let schema_input = r#"
...   |
141 | |     assert_eq!(field_ty, ["ID", "String", "URL"]);
142 | | }
    | |_^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
    = note: `#[warn(clippy::needless_doctest_main)]` on by default

warning: needless `fn main` in doctest
   --> crates/apollo-compiler/src/../README.md:147:1
    |
147 | / use apollo_compiler::{Schema, ExecutableDocument, Node, executable};
148 | |
149 | | fn main() {
150 | |     let schema_input = r#"
...   |
206 | |     assert_eq!(in_stock_directive, ["join__field"]);
207 | | }
    | |_^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main