tsk-78: Updating returned error on converting ostring to string (#87)
* tsk-78: Making error to get string from o string more robust * tsk-78: Version bump
This commit was merged in pull request #87.
This commit is contained in:
Generated
+1
-1
@@ -451,7 +451,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "icarus-dm"
|
name = "icarus-dm"
|
||||||
version = "0.8.4"
|
version = "0.8.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"http",
|
"http",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "icarus-dm"
|
name = "icarus-dm"
|
||||||
version = "0.8.4"
|
version = "0.8.5"
|
||||||
rust-version = "1.90"
|
rust-version = "1.90"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
|
|||||||
+15
-1
@@ -1,6 +1,20 @@
|
|||||||
pub fn o_to_string(val: &std::ffi::OsString) -> Result<std::string::String, std::io::Error> {
|
pub fn o_to_string(val: &std::ffi::OsString) -> Result<std::string::String, std::io::Error> {
|
||||||
match val.clone().into_string() {
|
match val.clone().into_string() {
|
||||||
Ok(value) => Ok(value),
|
Ok(value) => Ok(value),
|
||||||
Err(_) => Err(std::io::Error::other(String::from("Error"))),
|
Err(err) => match err.into_string() {
|
||||||
|
Ok(res) => {
|
||||||
|
Err(std::io::Error::other(res.to_string()))
|
||||||
|
}
|
||||||
|
Err(err) => {
|
||||||
|
match err.to_str() {
|
||||||
|
Some(err) => {
|
||||||
|
Err(std::io::Error::other(err))
|
||||||
|
}
|
||||||
|
None => {
|
||||||
|
Err(std::io::Error::other("Undefined error"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user