fixed split packages being possibly null
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -19,7 +19,7 @@ checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "alhp_api"
|
name = "alhp_api"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "alhp_api"
|
name = "alhp_api"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
authors = ["mpuchstein"]
|
authors = ["mpuchstein"]
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ pub mod packages {
|
|||||||
pub struct Package {
|
pub struct Package {
|
||||||
pub pkgbase: String,
|
pub pkgbase: String,
|
||||||
pub repo: String,
|
pub repo: String,
|
||||||
pub split_packages: Vec<String>,
|
pub split_packages: Option<Vec<String>>,
|
||||||
pub status: PackageStatus,
|
pub status: PackageStatus,
|
||||||
pub skip_reason: Option<String>,
|
pub skip_reason: Option<String>,
|
||||||
pub lto: String,
|
pub lto: String,
|
||||||
@@ -110,7 +110,7 @@ pub mod packages {
|
|||||||
StatusCode::OK => {
|
StatusCode::OK => {
|
||||||
let response = response.text()?;
|
let response = response.text()?;
|
||||||
match serde_json::from_str(&response) {
|
match serde_json::from_str(&response) {
|
||||||
Ok(pkgResponse) => Ok(pkgResponse),
|
Ok(pkg_response) => Ok(pkg_response),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("Failed to deserialize JSON: {}", e);
|
error!("Failed to deserialize JSON: {}", e);
|
||||||
error!("Response body: {}", response);
|
error!("Response body: {}", response);
|
||||||
@@ -179,7 +179,7 @@ pub mod general {
|
|||||||
StatusCode::OK => {
|
StatusCode::OK => {
|
||||||
let response = response.text()?;
|
let response = response.text()?;
|
||||||
match serde_json::from_str(&response) {
|
match serde_json::from_str(&response) {
|
||||||
Ok(genResponse) => Ok(genResponse),
|
Ok(gen_response) => Ok(gen_response),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("Failed to deserialize JSON: {}", e);
|
error!("Failed to deserialize JSON: {}", e);
|
||||||
error!("Response body: {}", response);
|
error!("Response body: {}", response);
|
||||||
|
Reference in New Issue
Block a user