Skip to content

Commit 2bf9c83

Browse files
authored
api: rename CursorIconParseError to ParseError
Crate is named `cursor-icon`, thus no need to include it again in the structure name.
1 parent b89c799 commit 2bf9c83

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ impl core::fmt::Display for CursorIcon {
328328
}
329329

330330
impl core::str::FromStr for CursorIcon {
331-
type Err = CursorIconParseError;
331+
type Err = ParseError;
332332

333333
fn from_str(name: &str) -> Result<Self, Self::Err> {
334334
match name {
@@ -366,7 +366,7 @@ impl core::str::FromStr for CursorIcon {
366366
"all-scroll" => Ok(CursorIcon::AllScroll),
367367
"zoom-in" => Ok(CursorIcon::ZoomIn),
368368
"zoom-out" => Ok(CursorIcon::ZoomOut),
369-
_ => Err(CursorIconParseError { _private: () }),
369+
_ => Err(ParseError { _private: () }),
370370
}
371371
}
372372
}
@@ -377,15 +377,15 @@ impl core::str::FromStr for CursorIcon {
377377
///
378378
/// [`FromStr`]: core::str::FromStr
379379
#[derive(Debug, PartialEq, Eq)]
380-
pub struct CursorIconParseError {
380+
pub struct ParseError {
381381
_private: (),
382382
}
383383

384-
impl core::fmt::Display for CursorIconParseError {
384+
impl core::fmt::Display for ParseError {
385385
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
386386
f.write_str("failed to parse cursor icon")
387387
}
388388
}
389389

390390
#[cfg(feature = "std")]
391-
impl std::error::Error for CursorIconParseError {}
391+
impl std::error::Error for ParseError {}

0 commit comments

Comments
 (0)