Skip to content

Commit

Permalink
Merge pull request #609 from andrey-yantsen/dependabot/cargo/sysinfo-…
Browse files Browse the repository at this point in the history
…0.30.1

chore(deps): update sysinfo requirement from 0.29.9 to 0.30.1
  • Loading branch information
mergify[bot] committed Dec 26, 2023
2 parents d716f35 + ff70260 commit ae30bdf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion crates/plex-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ http = "^0.2.8"
http-serde = "^1.1"
serde_urlencoded = "^0.7.1"
thiserror = "^1.0"
sysinfo = "0.29.9"
sysinfo = "0.30.1"
monostate = "^0.1.2"
serde-aux = "^4.1.2"
enum_dispatch = "^0.3.8"
Expand Down
8 changes: 3 additions & 5 deletions crates/plex-api/src/http_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use isahc::{
use secrecy::{ExposeSecret, SecretString};
use serde::{de::DeserializeOwned, Serialize};
use std::time::Duration;
use sysinfo::SystemExt;
use uuid::Uuid;

const DEFAULT_TIMEOUT: Duration = Duration::from_secs(30);
Expand Down Expand Up @@ -465,10 +464,9 @@ pub struct HttpClientBuilder {

impl Default for HttpClientBuilder {
fn default() -> Self {
let sys = sysinfo::System::new();
let sys_platform = sys.name().unwrap_or("unknown".to_string());
let sys_version = sys.os_version().unwrap_or("unknown".to_string());
let sys_hostname = sys.host_name().unwrap_or("unknown".to_string());
let sys_platform = sysinfo::System::name().unwrap_or("unknown".to_string());
let sys_version = sysinfo::System::os_version().unwrap_or("unknown".to_string());
let sys_hostname = sysinfo::System::host_name().unwrap_or("unknown".to_string());

let random_uuid = Uuid::new_v4();

Expand Down
5 changes: 1 addition & 4 deletions crates/plex-api/tests/fixtures/online/client.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
use super::client_builder;
use plex_api::{HttpClient, HttpClientBuilder};
use rstest::fixture;
use sysinfo::SystemExt;

#[fixture]
pub fn platform() -> String {
sysinfo::System::new()
.name()
.unwrap_or("unknown".to_string())
sysinfo::System::name().unwrap_or("unknown".to_string())
}

#[fixture]
Expand Down

0 comments on commit ae30bdf

Please sign in to comment.