Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6fad760

Browse files
committed
fix(mbuild): doit() call with enum type annotation
It's syntax I never used before, but ... works ! Now lets try to get the BorrowMut back
1 parent 5b2d8a7 commit 6fad760

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/mako/lib/mbuild.mako

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ ${'.' + api.terms.action | indent_by(13)}();
273273
stripped = lambda s: s.strip().strip(',')
274274
qualifier = ''
275275
for p in media_params:
276-
type_params += p.type.param + (' = %s, ' % p.type.default)
277-
where += p.type.param + ': BorrowMut<' + p.type.where + '>, '
276+
type_params += p.type.param + ', '
277+
where += p.type.param + ': ' + p.type.where + ', '
278278
add_args += p.type.arg_name + ': ' + ('Option<%s>' % p.type.param) + ', '
279279
# end for each param
280280
where = ' where ' + stripped(where)
@@ -292,14 +292,14 @@ ${'.' + api.terms.action | indent_by(13)}();
292292
293293
% for p in media_params:
294294
pub fn ${api.terms.upload_action}${p.type.suffix}<${p.type.param}>(mut self, ${p.type.arg_name}: ${p.type.param}) -> ${rtype}
295-
where ${p.type.param}: BorrowMut<${p.type.where}> {
295+
where ${p.type.param}: ${p.type.where} {
296296
self.${api.terms.action}(\
297297
% for _ in range(0, loop.index):
298-
None, \
298+
None::<${p.type.default}>, \
299299
% endfor
300300
Some(${p.type.arg_name}), \
301301
% for _ in range(loop.index+1, len(media_params)):
302-
None, \
302+
None::<${p.type.default}>, \
303303
% endfor
304304
)
305305
}

0 commit comments

Comments
 (0)