Update the readme example to reflect the current API and include an example Cargo.toml as well
This commit is contained in:
parent
f254b10fca
commit
38008c66ca
1 changed files with 17 additions and 1 deletions
18
README.md
18
README.md
|
@ -62,7 +62,7 @@ async fn main() -> Result<(), failure::Error> {
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("the-irc-crate".to_owned()),
|
nickname: Some("the-irc-crate".to_owned()),
|
||||||
server: Some("chat.freenode.net".to_owned()),
|
server: Some("chat.freenode.net".to_owned()),
|
||||||
channels: Some(vec!["#test".to_owned()]),
|
channels: vec!["#test".to_owned()],
|
||||||
..Config::default()
|
..Config::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -79,6 +79,22 @@ async fn main() -> Result<(), failure::Error> {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Example Cargo.toml file:
|
||||||
|
```rust,no_run,edition2018
|
||||||
|
[package]
|
||||||
|
name = "example"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
irc = "0.15.0"
|
||||||
|
tokio = { version = "1.0.0", features = ["rt", "rt-multi-thread", "macros", "net", "time"] }
|
||||||
|
futures = "0.3.0"
|
||||||
|
failure = "0.1.8"
|
||||||
|
```
|
||||||
|
|
||||||
## Configuring IRC Clients
|
## Configuring IRC Clients
|
||||||
|
|
||||||
As seen above, there are two techniques for configuring the irc crate: runtime loading and
|
As seen above, there are two techniques for configuring the irc crate: runtime loading and
|
||||||
|
|
Loading…
Reference in a new issue