use crate::types::Token;
#[cfg(all(feature = "no_std", not(feature = "no_module")))]
use std::prelude::v1::*;
const SEPARATOR: &str = Token::DoubleColon.literal_syntax();
#[cfg(not(feature = "no_module"))]
#[inline]
pub(crate) fn qualify(namespace: impl core::fmt::Display, name: &str) -> String {
format!("{namespace}{SEPARATOR}{name}")
}
#[inline]
pub(crate) fn split_qualified(name: &str) -> Option<(&str, &str)> {
match name.rsplit_once(SEPARATOR)? {
("", _) | (_, "") => None,
parts => Some(parts),
}
}