feat: impl Hash for DirsAndFileName and PathParts
parent
d726cf4829
commit
fadf0176d4
|
@ -3,7 +3,7 @@ use super::{ObjectStorePath, PathPart, DELIMITER};
|
|||
use itertools::Itertools;
|
||||
|
||||
/// A path stored as a collection of 0 or more directories and 0 or 1 file name
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default)]
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)]
|
||||
pub struct DirsAndFileName {
|
||||
/// Directory hierarchy.
|
||||
pub directories: Vec<PathPart>,
|
||||
|
|
|
@ -16,7 +16,7 @@ const EMPTY: &str = "%";
|
|||
///
|
||||
/// A PathPart instance is guaranteed to be non-empty and to contain no `/`
|
||||
/// characters as it can only be constructed by going through the `from` impl.
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default)]
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)]
|
||||
pub struct PathPart(pub(super) String);
|
||||
|
||||
/// Characters we want to encode.
|
||||
|
|
Loading…
Reference in New Issue