mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[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:
parent
7f73eb582d
commit
bd2e373d66
4 changed files with 31 additions and 21 deletions
23
src/lib.rs
23
src/lib.rs
|
|
@ -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"))]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue