Update Rich Presence example
Add Windows connection and remove version dependency from Cargo.toml
This commit is contained in:
parent
b8e4697555
commit
ced34974cf
|
@ -8,5 +8,3 @@ simplelog = "~0.5"
|
||||||
|
|
||||||
[dependencies.discord-rpc-client]
|
[dependencies.discord-rpc-client]
|
||||||
path = "../../"
|
path = "../../"
|
||||||
version = "^0.1"
|
|
||||||
default-features = true
|
|
||||||
|
|
|
@ -4,7 +4,10 @@ extern crate discord_rpc_client;
|
||||||
use simplelog::*;
|
use simplelog::*;
|
||||||
use std::{thread, time};
|
use std::{thread, time};
|
||||||
use discord_rpc_client::Client as DiscordRPC;
|
use discord_rpc_client::Client as DiscordRPC;
|
||||||
|
#[cfg(unix)]
|
||||||
use discord_rpc_client::UnixConnection as Connection;
|
use discord_rpc_client::UnixConnection as Connection;
|
||||||
|
#[cfg(windows)]
|
||||||
|
use discord_rpc_client::WindowsConnection as Connection;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
TermLogger::init(LevelFilter::Debug, Config::default()).unwrap();
|
TermLogger::init(LevelFilter::Debug, Config::default()).unwrap();
|
||||||
|
|
Loading…
Reference in New Issue