Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
museun committed Sep 29, 2020
1 parent b19c1f2 commit d250314
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/async_io_demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async fn connect(user_config: &UserConfig, channels: &[String]) -> anyhow::Resul
// create a connector using ``async_io``, this connects to Twitch.
// you can provide a different address with `custom`
// this can fail if DNS resolution cannot happen
let connector = connector::async_io::Connector::twitch().unwrap();
let connector = connector::async_io::Connector::twitch()?;

println!("we're connecting!");
// create a new runner. this is a provided async 'main loop'
Expand Down
2 changes: 1 addition & 1 deletion examples/async_std_demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::include::{channels_to_join, get_user_config, main_loop};
async fn connect(user_config: &UserConfig, channels: &[String]) -> anyhow::Result<AsyncRunner> {
// create a connector using ``async_std``, this connects to Twitch.
// you can provide a different address with `custom`
let connector = connector::async_std::Connector::twitch();
let connector = connector::async_std::Connector::twitch()?;

println!("we're connecting!");
// create a new runner. this is a provided async 'main loop'
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_bot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl Bot {
// run the bot until its done
async fn run(&mut self, user_config: &UserConfig, channels: &[String]) -> anyhow::Result<()> {
// this can fail if DNS resolution cannot happen
let connector = twitchchat::connector::smol::Connector::twitch().unwrap();
let connector = twitchchat::connector::smol::Connector::twitch()?;

let mut runner = AsyncRunner::connect(connector, user_config).await?;
println!("connecting, we are: {}", runner.identity.username());
Expand Down
2 changes: 1 addition & 1 deletion examples/smol_demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async fn connect(user_config: &UserConfig, channels: &[String]) -> anyhow::Resul
// create a connector using ``smol``, this connects to Twitch.
// you can provide a different address with `custom`
// this can fail if DNS resolution cannot happen
let connector = connector::smol::Connector::twitch().unwrap();
let connector = connector::smol::Connector::twitch()?;

println!("we're connecting!");
// create a new runner. this is a provided async 'main loop'
Expand Down
2 changes: 1 addition & 1 deletion examples/tokio_demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::include::{channels_to_join, get_user_config, main_loop};
async fn connect(user_config: &UserConfig, channels: &[String]) -> anyhow::Result<AsyncRunner> {
// create a connector using ``tokio``, this connects to Twitch.
// you can provide a different address with `custom`
let connector = connector::tokio::Connector::twitch();
let connector = connector::tokio::Connector::twitch()?;

println!("we're connecting!");
// create a new runner. this is a provided async 'main loop'
Expand Down
2 changes: 1 addition & 1 deletion src/connector/async_io/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ mod tests {

assert_connector::<ConnectorTls>();
assert_type_is_read_write::<<ConnectorTls as C>::Output>();
assert_obj_is_sane(ConnectorTls::twitch());
assert_obj_is_sane(ConnectorTls::twitch().unwrap());
}
}
2 changes: 1 addition & 1 deletion src/connector/async_std/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ mod tests {

assert_connector::<ConnectorTls>();
assert_type_is_read_write::<<ConnectorTls as C>::Output>();
assert_obj_is_sane(ConnectorTls::twitch());
assert_obj_is_sane(ConnectorTls::twitch().unwrap());
}
}
2 changes: 1 addition & 1 deletion src/connector/smol/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ mod tests {

assert_connector::<ConnectorTls>();
assert_type_is_read_write::<<ConnectorTls as C>::Output>();
assert_obj_is_sane(ConnectorTls::twitch());
assert_obj_is_sane(ConnectorTls::twitch().unwrap());
}
}
2 changes: 1 addition & 1 deletion src/connector/tokio/native_tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ mod tests {

assert_connector::<ConnectorNativeTls>();
assert_type_is_read_write::<<ConnectorNativeTls as C>::Output>();
assert_obj_is_sane(ConnectorNativeTls::twitch());
assert_obj_is_sane(ConnectorNativeTls::twitch().unwrap());
}
}
2 changes: 1 addition & 1 deletion src/connector/tokio/rustls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ mod tests {

assert_connector::<ConnectorRustTls>();
assert_type_is_read_write::<<ConnectorRustTls as C>::Output>();
assert_obj_is_sane(ConnectorRustTls::twitch());
assert_obj_is_sane(ConnectorRustTls::twitch().unwrap());
}
}

0 comments on commit d250314

Please sign in to comment.