This repository was archived by the owner on Sep 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
crates/wysiwyg/src/dom/nodes Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ pub enum MentionNodeKind<S>
38
38
where
39
39
S : UnicodeString ,
40
40
{
41
- Room { mention : Mention < S > } ,
42
- User { mention : Mention < S > } ,
41
+ Room { mention : Mention } ,
42
+ User { mention : Mention } ,
43
43
MatrixUrl { display_text : S , url : S } ,
44
44
AtRoom ,
45
45
}
81
81
MentionNodeKind :: MatrixUrl { display_text, .. } => {
82
82
display_text. clone ( )
83
83
}
84
- MentionNodeKind :: User { mention } => mention. display_text ( ) . clone ( ) ,
85
- MentionNodeKind :: Room { mention } => mention. display_text ( ) . clone ( ) ,
84
+ MentionNodeKind :: User { mention } => {
85
+ S :: from ( mention. display_text ( ) )
86
+ }
87
+ MentionNodeKind :: Room { mention } => {
88
+ S :: from ( mention. display_text ( ) )
89
+ }
86
90
MentionNodeKind :: AtRoom => S :: from ( "@room" ) ,
87
91
}
88
92
}
@@ -243,10 +247,10 @@ where
243
247
244
248
// There are two different functions to allow for fact one will use mxId later on
245
249
match self . kind ( ) {
246
- User => {
250
+ User { .. } => {
247
251
// TODO do something
248
252
}
249
- Room => {
253
+ Room { .. } => {
250
254
// TODO do something
251
255
}
252
256
MatrixUrl { .. } => {
You can’t perform that action at this time.
0 commit comments