mysqladm/cli/mysql_admutils_compatibility/
common.rs

1use crate::core::protocol::{MySQLDatabase, MySQLUser};
2
3#[inline]
4pub fn trim_db_name_to_32_chars(db_name: &MySQLDatabase) -> MySQLDatabase {
5    db_name.chars().take(32).collect::<String>().into()
6}
7
8#[inline]
9pub fn trim_user_name_to_32_chars(user_name: &MySQLUser) -> MySQLUser {
10    user_name.chars().take(32).collect::<String>().into()
11}