Skip to content

Commit 44a6db5

Browse files
authored
chore: ensure macro is prepared for potential pretty printing improvements
See rust-lang/rust#117433 (comment)
1 parent d9e2447 commit 44a6db5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

awto-macros/src/proc_macros/schema/database_table.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ impl DatabaseTableModel {
112112
"type is not suppoerted",
113113
));
114114
};
115-
let db_type_is_text = ty.to_string().ends_with(":: Text");
115+
let ty_string = ty.to_string();
116+
let db_type_is_text = ty_string.ends_with("::Text") || ty_string.ends_with(":: Text");
116117
if let Some(max_len) = &field.attrs.max_len {
117118
if !db_type_is_text {
118119
return Err(syn::Error::new(

0 commit comments

Comments
 (0)