Change Tokio example description to Core

This commit is contained in:
blyxyas 2023-04-19 21:22:13 +02:00
parent 94387efc83
commit b2e1ede39c
No known key found for this signature in database
GPG Key ID: 4D38170B5A2FC334

View File

@ -78,8 +78,7 @@ implementation.
> **Note**: This approach should be avoided if possible, the best thing to do would be to make a PR to [`rust-lang/rust`][rust]. > **Note**: This approach should be avoided if possible, the best thing to do would be to make a PR to [`rust-lang/rust`][rust].
Below, we check if the given `expr` implements `tokio`'s Below, we check if the given `expr` implements the `Iterator`'s trait method `cloned` :
[`AsyncReadExt`][AsyncReadExt] trait:
```rust ```rust
use clippy_utils::{match_trait_method, paths}; use clippy_utils::{match_trait_method, paths};
@ -95,7 +94,6 @@ impl LateLintPass<'_> for CheckTokioAsyncReadExtTrait {
} }
``` ```
[AsyncReadExt]: https://docs.rs/tokio/latest/tokio/io/trait.AsyncReadExt.html
[DefId]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/def_id/struct.DefId.html [DefId]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/def_id/struct.DefId.html
[diagnostic_items]: https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-items.html [diagnostic_items]: https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-items.html
[lang_items]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/lang_items/struct.LanguageItems.html [lang_items]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/lang_items/struct.LanguageItems.html
@ -105,4 +103,4 @@ impl LateLintPass<'_> for CheckTokioAsyncReadExtTrait {
[symbol_index]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_span/symbol/sym/index.html [symbol_index]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_span/symbol/sym/index.html
[TyCtxt]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html [TyCtxt]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html
[using_diagnostic_items]: https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-items.html#using-diagnostic-items [using_diagnostic_items]: https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-items.html#using-diagnostic-items
[rust]: https://github.com/rust-lang/rust [rust]: https://github.com/rust-lang/rust