Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation is out of date #27

Closed
DuncanUszkay1 opened this issue Jun 20, 2019 · 2 comments
Closed

Documentation is out of date #27

DuncanUszkay1 opened this issue Jun 20, 2019 · 2 comments

Comments

@DuncanUszkay1
Copy link

The examples in the readme don't work in version 0.6.1.
If I create a new project and copy the example code:

use dogstatsd::{Client, Options};

fn main() {
    let client = Client::new(Options::default());

    // Increment a counter
    client.incr("my_counter", vec![]).unwrap();
}

I get a compiler error:

Compiling rust-test v0.1.0 (/Users/duncanuszkay/src/github.com/Shopify/rust-test)
error[E0599]: no method named `incr` found for type `std::result::Result<dogstatsd::Client, dogstatsd::error::DogstatsdError>` in the current scope
 --> src/main.rs:7:12
  |
7 |     client.incr("my_counter", vec![]).unwrap();
  |            ^^^^

error: aborting due to previous error

It seems that this is due to the fact that the Client::new method returns a result in the newer code.

Additionally the link to full documentation is out of date:
Screen Shot 2019-06-20 at 10 11 12 AM

@mcasper
Copy link
Owner

mcasper commented Jun 23, 2019

Hey @DuncanUszkay1, thank you for reporting this! I just pushed a commit that should resolve this: 031dea8

@mcasper
Copy link
Owner

mcasper commented Jun 23, 2019

In addition I've just pushed 9fb82d1 which fixes the Travis/Github integration for uploading the latest docs to GH pages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants