(id_str: &str)
| 76 | } |
| 77 | |
| 78 | pub(crate) fn parse_str_snowflake_id(id_str: &str) -> Result<Id<GenericMarker>, AnyError> { |
| 79 | if let Some(id) = Id::new_checked(id_str.parse()?) { |
| 80 | Ok(id) |
| 81 | } else { |
| 82 | Err(anyhow::anyhow!("invalid channel id")) |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | pub(crate) fn parse_str_snowflake_ids<M>( |
| 87 | ids: impl Iterator<Item = String>, |
no outgoing calls
no test coverage detected