From 6fad7600a03f2f6a3964f309fc8e277b34f8aa60 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 8 Mar 2015 15:55:41 +0100 Subject: [PATCH] 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 --- src/mako/lib/mbuild.mako | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mako/lib/mbuild.mako b/src/mako/lib/mbuild.mako index bf3a6d69fc..64e1f5e461 100644 --- a/src/mako/lib/mbuild.mako +++ b/src/mako/lib/mbuild.mako @@ -273,8 +273,8 @@ ${'.' + api.terms.action | indent_by(13)}(); stripped = lambda s: s.strip().strip(',') qualifier = '' for p in media_params: - type_params += p.type.param + (' = %s, ' % p.type.default) - where += p.type.param + ': BorrowMut<' + p.type.where + '>, ' + type_params += p.type.param + ', ' + where += p.type.param + ': ' + p.type.where + ', ' add_args += p.type.arg_name + ': ' + ('Option<%s>' % p.type.param) + ', ' # end for each param where = ' where ' + stripped(where) @@ -292,14 +292,14 @@ ${'.' + api.terms.action | indent_by(13)}(); % for p in media_params: pub fn ${api.terms.upload_action}${p.type.suffix}<${p.type.param}>(mut self, ${p.type.arg_name}: ${p.type.param}) -> ${rtype} - where ${p.type.param}: BorrowMut<${p.type.where}> { + where ${p.type.param}: ${p.type.where} { self.${api.terms.action}(\ % for _ in range(0, loop.index): -None, \ +None::<${p.type.default}>, \ % endfor Some(${p.type.arg_name}), \ % for _ in range(loop.index+1, len(media_params)): -None, \ +None::<${p.type.default}>, \ % endfor ) }