aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Anshul Gupta <ansg191@anshulg.com> 2024-08-28 16:06:09 -0700
committerGravatar Anshul Gupta <ansg191@anshulg.com> 2024-08-28 16:06:09 -0700
commitd6b53fdd905859641893aa2326bf940464d02320 (patch)
treeab6e07ef58bfce7907aa4b3a7a137e62b6879e1d
parent4a5ca854ccbb8a2932d0fab918e5c935b4ea9d17 (diff)
downloadnotion-main.tar.gz
notion-main.tar.zst
notion-main.zip
Make identifier::from_str infallibleHEADmainidentifier-infallible
-rw-r--r--src/ids.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ids.rs b/src/ids.rs
index 611212e..bac7f2e 100644
--- a/src/ids.rs
+++ b/src/ids.rs
@@ -1,5 +1,5 @@
use std::fmt::Display;
-use std::fmt::Error;
+use std::convert::Infallible;
pub trait Identifier: Display {
fn value(&self) -> &str;
@@ -50,7 +50,7 @@ macro_rules! identifer {
}
impl std::str::FromStr for $name {
- type Err = Error;
+ type Err = Infallible;
fn from_str(s: &str) -> Result<Self, Self::Err> {
Ok($name(s.to_string()))