Skip to content

Commit

Permalink
Merge pull request #237 from yancyribbens/fix/readme-example
Browse files Browse the repository at this point in the history
Update the readme example
  • Loading branch information
aatxe authored May 22, 2023
2 parents d74e011 + 38008c6 commit 3d037df
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async fn main() -> Result<(), failure::Error> {
let config = Config {
nickname: Some("the-irc-crate".to_owned()),
server: Some("chat.freenode.net".to_owned()),
channels: Some(vec!["#test".to_owned()]),
channels: vec!["#test".to_owned()],
..Config::default()
};
Expand All @@ -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

As seen above, there are two techniques for configuring the irc crate: runtime loading and
Expand Down

0 comments on commit 3d037df

Please sign in to comment.