Skip to content

Commit

Permalink
remove Empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mina86 committed Nov 10, 2023
1 parent defa1f5 commit bd128be
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
2 changes: 0 additions & 2 deletions crates/ibc/src/core/ics24_host/identifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,6 @@ pub enum IdentifierError {
UnformattedRevisionNumber { chain_id: String },
/// revision number overflowed
RevisionNumberOverflow,
/// identifier cannot be empty
Empty,
}

#[cfg(feature = "std")]
Expand Down
12 changes: 0 additions & 12 deletions crates/ibc/src/core/ics24_host/identifier/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ const VALID_SPECIAL_CHARS: &str = "._+-#[]<>";
/// [`ICS-24`](https://github.com/cosmos/ibc/tree/main/spec/core/ics-024-host-requirements#paths-identifiers-separators)]
/// spec.
pub fn validate_identifier_chars(id: &str) -> Result<(), Error> {
// Check identifier is not empty
if id.is_empty() {
return Err(Error::Empty);
}

// Check that the identifier comprises only valid characters:
// - Alphanumeric
// - `.`, `_`, `+`, `-`, `#`
Expand Down Expand Up @@ -210,13 +205,6 @@ mod tests {
assert!(id.is_err())
}

#[test]
fn parse_invalid_id_empty() {
// invalid id empty
let id = validate_identifier_chars("");
assert!(id.is_err())
}

#[test]
fn parse_invalid_id_path_separator() {
// invalid id with path separator
Expand Down

0 comments on commit bd128be

Please sign in to comment.