Skip to content

Commit

Permalink
CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
seanlinsley committed Dec 15, 2022
1 parent f4604c4 commit b2bb84c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion prost-build/src/code_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl<'a> CodeGenerator<'a> {
assert_eq!(b'.', fq_message_name.as_bytes()[0]);
if let Some(limit) = self.config.recursion_limits.get_first(fq_message_name) {
push_indent(self.buf, self.depth);
self.buf.push_str(&format!("#[RecursionLimit({limit})]"));
self.buf.push_str(&format!("#[RecursionLimit({})]", limit));
self.buf.push('\n');
}
}
Expand Down
2 changes: 1 addition & 1 deletion prost-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn try_message(input: TokenStream) -> Result<TokenStream, Error> {
if let syn::Lit::Int(attr) = attr.parse_args().unwrap() {
attr.base10_parse().unwrap()
} else {
panic!("unexpected RecursionLimit type: {attr:?}")
panic!("unexpected RecursionLimit type: {:?}", attr)
}
} else {
100
Expand Down
5 changes: 2 additions & 3 deletions tests/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ fn main() {
.compile_protos(&[src.join("ident_conversion.proto")], includes)
.unwrap();

let mut c = prost_build::Config::new();
c.recursion_limit("E", 200);
c.compile_protos(&[src.join("nesting.proto")], includes)
config.recursion_limit("nesting.E", 200);
config.compile_protos(&[src.join("nesting.proto")], includes)
.unwrap();

config
Expand Down

0 comments on commit b2bb84c

Please sign in to comment.