Skip to content

Commit 9c7029f

Browse files
committed
pth : another error for TryFrom for AbsolutePath
1 parent 3d9fec6 commit 9c7029f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ path = "module/alias/file_tools"
367367
default-features = false
368368

369369
[workspace.dependencies.pth]
370-
version = "~0.19.0"
370+
version = "~0.20.0"
371371
path = "module/core/pth"
372372
default-features = false
373373

module/core/pth/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pth"
3-
version = "0.19.0"
3+
version = "0.20.0"
44
edition = "2021"
55
authors = [
66
"Kostiantyn Wandalen <[email protected]>",

module/core/pth/src/path/absolute_path.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ mod private
2828
/// Relative paths can be problematic as they introduce additional variables and complexities, making code analysis, integration, refactoring, and testing more difficult.
2929
/// By using absolute paths, software architecture can be improved, similar to how avoiding global variables can enhance code quality.
3030
/// It is recommended to use relative paths only at the outskirts of an application.
31-
#[cfg_attr( feature = "derive_serde", derive( Serialize, Deserialize ) )]
32-
#[derive( Debug, Default, Clone, Ord, PartialOrd, Eq, PartialEq, Hash )]
31+
#[ cfg_attr( feature = "derive_serde", derive( Serialize, Deserialize ) ) ]
32+
#[ derive( Debug, Default, Clone, Ord, PartialOrd, Eq, PartialEq, Hash ) ]
3333
pub struct AbsolutePath( PathBuf );
3434

3535
impl AbsolutePath
@@ -157,7 +157,7 @@ mod private
157157

158158
if !is_absolute( &path )
159159
{
160-
return Err( io::Error::new( io::ErrorKind::InvalidData, "Path expected to be absolute, but it's not {path}" ) );
160+
return Err( io::Error::new( io::ErrorKind::Other, "Path expected to be absolute, but it's not {path}" ) );
161161
}
162162

163163
Ok( Self( path ) )

0 commit comments

Comments
 (0)