[Docs] Match the docs example to the one from the readme

This commit is contained in:
CosminPerRam 2023-03-04 14:04:38 +02:00
parent 9d0cc15f4c
commit 8992ffe4df

View file

@ -4,15 +4,15 @@
//! # An usage example: //! # An usage example:
//! //!
//! ```no_run //! ```no_run
//! use gamedig::games::tf2; //!use gamedig::games::tf2;
//! //!
//! fn main() { //!fn main() {
//! let response = tf2::query("91.216.250.10", None); //or Some(27015), None is the default protocol port //! let response = tf2::query("127.0.0.1", None); // None is the default port (which is 27015), could also be Some(27015)
//! match response { //! match response { // Result type, must check what it is...
//! Err(error) => println!("Couldn't query, error: {}", error), //! Err(error) => println!("Couldn't query, error: {}", error),
//! Ok(r) => println!("{:?}", r) //! Ok(r) => println!("{:#?}", r)
//! } //! }
//! } //!}
//! ``` //! ```
//! //!
//! # Crate features: //! # Crate features: