diff --git a/Cargo.toml b/Cargo.toml index dd92aaa..e1f9f9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,6 @@ serde_derive = "^1.0" serde_json = "^1.0" byteorder = "^1.0" log = "~0.4" -libc = "0.2.39" # until std::process::id is stable [target.'cfg(windows)'.dependencies] named_pipe = "0.3.0" diff --git a/src/client.rs b/src/client.rs index 46652d3..3d7dcc9 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,4 +1,5 @@ use serde::{Serialize, de::DeserializeOwned}; +#[allow(unused)] use serde_json::Value; use connection::Manager as ConnectionManager; diff --git a/src/lib.rs b/src/lib.rs index 385ba6a..cae9421 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,7 +7,6 @@ extern crate serde; extern crate serde_json; extern crate byteorder; extern crate uuid; -extern crate libc; #[cfg(windows)] extern crate named_pipe; diff --git a/src/models/rich_presence.rs b/src/models/rich_presence.rs index 81d8f3d..05f5221 100644 --- a/src/models/rich_presence.rs +++ b/src/models/rich_presence.rs @@ -8,7 +8,7 @@ use utils; #[derive(Debug, PartialEq, Deserialize, Serialize)] pub struct SetActivityArgs { - pid: i32, + pid: u32, #[serde(skip_serializing_if = "Option::is_none")] activity: Option, diff --git a/src/utils.rs b/src/utils.rs index cabd3cc..e8b1952 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,9 +1,9 @@ -use libc::getpid; use uuid::Uuid; -pub fn pid() -> i32 { - unsafe { getpid() as i32 } +#[allow(unused)] +pub fn pid() -> u32 { + std::process::id() } pub fn nonce() -> String {