(uid: &str)
| 145 | } |
| 146 | |
| 147 | fn canonical_uid(uid: &str) -> Result<(), IriError> { |
| 148 | let parsed = ulid::Ulid::from_string(uid).map_err(|_| IriError(uid.into()))?; |
| 149 | if parsed.to_string() != uid { |
| 150 | return Err(IriError(uid.into())); |
| 151 | } |
| 152 | Ok(()) |
| 153 | } |
| 154 | |
| 155 | pub fn mint_intent(project: &ProjectId, uid: &str) -> Result<String, IriError> { |
| 156 | canonical_uid(uid)?; |
no test coverage detected