diff --git a/src/mako/lib/mbuild.mako b/src/mako/lib/mbuild.mako index 929dd7a286e..19a4dd9c8dc 100644 --- a/src/mako/lib/mbuild.mako +++ b/src/mako/lib/mbuild.mako @@ -649,7 +649,7 @@ else { % if request_value: let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = io::Cursor::new(json::to_vec(&self.${property(REQUEST_VALUE_PROPERTY_NAME)}).unwrap()); + let mut request_value_reader = io::Cursor::new(json::to_vec(&self.${property(REQUEST_VALUE_PROPERTY_NAME)})); let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); % endif diff --git a/src/mako/lib/util.py b/src/mako/lib/util.py index ef2c9b288f3..a2d5f5ac1ad 100644 --- a/src/mako/lib/util.py +++ b/src/mako/lib/util.py @@ -320,10 +320,10 @@ def wrap_type(tn): try: rust_type = TYPE_MAP[t.type] if t.type == 'array': - return "%s<%s>" % (rust_type, unique_type_name((nested_type(t)))) + return wrap_type("%s<%s>" % (rust_type, unique_type_name((nested_type(t))))) elif t.type == 'object': if _is_map_prop(t): - return "%s" % (rust_type, nested_type(t)) + return wrap_type("%s" % (rust_type, nested_type(t))) else: return wrap_type(nested_type(t)) elif t.type == 'string' and 'Count' in pn: