Skip to content

Instantly share code, notes, and snippets.

@bvssvni
Created June 14, 2014 12:50
Show Gist options
  • Select an option

  • Save bvssvni/268cde966bdaa615edd3 to your computer and use it in GitHub Desktop.

Select an option

Save bvssvni/268cde966bdaa615edd3 to your computer and use it in GitHub Desktop.
src/gen/main.rs:324:17: 324:80 error: invalid format string: expected `}` but found `{`
src/gen/main.rs:324 "\\#[inline] pub {}fn {}({}){} \\{ {}(storage::{}.f)({}){} \\}",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fn write_fns(&mut self) {
for c in self.registry.cmd_iter() {
self.write_line(format!(
>> "\\#[inline] pub {}fn {}({}){} \\{ {}(storage::{}.f)({}){} \\}",
if c.is_safe { "" } else { "unsafe " },
c.proto.ident,
gen_param_list(c, true),
gen_return_suffix(c),
if !c.is_safe { "" } else { "unsafe { " },
c.proto.ident,
gen_param_ident_list(c),
if !c.is_safe { "" } else { " }" }
).as_slice());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment