[Crate] Make clippy happy (#23)

* fix: clippy::type_complexity

* fix: clippy::needless_doctest_main

* fix: clippy::read_zero_byte_vec

* fix: clippy::useless_conversion

* fix: clippy::slow_vector_initialization
This commit is contained in:
Cain 2023-03-13 10:28:49 +01:00 committed by GitHub
parent 7f73eb582d
commit bd2e373d66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 21 deletions

View file

@ -1,18 +1,15 @@
//! Game Server Query Library.
//!
//! # Usage example:
//!
//! ```no_run
//!use gamedig::games::tf2;
//! ```
//! use gamedig::games::tf2;
//!
//!fn main() {
//! let response = tf2::query("127.0.0.1", None); // None is the default port (which is 27015), could also be Some(27015)
//! match response { // Result type, must check what it is...
//! Err(error) => println!("Couldn't query, error: {}", error),
//! Ok(r) => println!("{:#?}", r)
//! }
//!}
//! let response = tf2::query("127.0.0.1", None); // None is the default port (which is 27015), could also be Some(27015)
//! match response { // Result type, must check what it is...
//! Err(error) => println!("Couldn't query, error: {}", error),
//! Ok(r) => println!("{:#?}", r)
//! }
//! ```
//!
//! # Crate features:
@ -21,13 +18,13 @@
//! `no_games` - disables the included games support.
pub mod errors;
pub mod protocols;
#[cfg(not(feature = "no_games"))]
pub mod games;
pub mod protocols;
mod utils;
mod socket;
mod bufferer;
mod socket;
mod utils;
pub use errors::*;
#[cfg(not(feature = "no_games"))]