fix git merge conflict
All checks were successful
Run Check Script / check (pull_request) Successful in 1m24s

This commit is contained in:
2025-12-17 17:09:32 -05:00
34 changed files with 837 additions and 343 deletions

View File

@@ -135,15 +135,17 @@ pub fn ingress_path(input: TokenStream) -> TokenStream {
#[proc_macro]
pub fn cidrv4(input: TokenStream) -> TokenStream {
let input = parse_macro_input!(input as LitStr);
let cidr_str = input.value();
let lit = parse_macro_input!(input as LitStr);
if cidr_str.parse::<cidr::Ipv4Cidr>().is_ok() {
let expanded = quote! { #cidr_str.parse::<cidr::Ipv4Cidr>().unwrap() };
return TokenStream::from(expanded);
}
// This is the IMPORTANT part:
// we re-emit the *string literal itself*
let expanded = quote! {
#lit
.parse::<cidr::Ipv4Cidr>()
.expect("Invalid IPv4 CIDR literal")
};
panic!("Invalid IPv4 CIDR : {}", cidr_str);
TokenStream::from(expanded)
}
/// Creates a `harmony_types::net::Url::Url` from a string literal.