mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 07:17:27 +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:
|
||||
//!
|
||||
//! ```no_run
|
||||
//! use gamedig::games::tf2;
|
||||
//!use gamedig::games::tf2;
|
||||
//!
|
||||
//! fn main() {
|
||||
//! let response = tf2::query("91.216.250.10", None); //or Some(27015), None is the default protocol port
|
||||
//! match response {
|
||||
//! Err(error) => println!("Couldn't query, error: {}", error),
|
||||
//! Ok(r) => println!("{:?}", r)
|
||||
//! }
|
||||
//! }
|
||||
//!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)
|
||||
//! }
|
||||
//!}
|
||||
//! ```
|
||||
//!
|
||||
//! # Crate features:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue