mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Docs] Match the docs example to the one from the readme
This commit is contained in:
parent
9d0cc15f4c
commit
8992ffe4df
1 changed files with 8 additions and 8 deletions
16
src/lib.rs
16
src/lib.rs
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue