mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-28 13:26:52 +00:00
macro: cleanup: rename parse_object2 to parse_object
The old parse_object function is gone now. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
916f9d945f
commit
8a2d7a43e0
@ -20,7 +20,7 @@ pub fn api_macro(attr: TokenStream, item: TokenStream) -> Result<TokenStream, Er
|
||||
_ => bail!("expected api definition in braces"),
|
||||
};
|
||||
|
||||
let definition = parse_object2(definition)?;
|
||||
let definition = parse_object(definition)?;
|
||||
|
||||
// Now parse the item, based on which we decide whether this is an API method which needs a
|
||||
// wrapper, or an API type which needs an ApiType implementation!
|
||||
|
@ -257,7 +257,7 @@ impl Expression {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parse_object2(tokens: TokenStream) -> Result<HashMap<String, Expression>, Error> {
|
||||
pub fn parse_object(tokens: TokenStream) -> Result<HashMap<String, Expression>, Error> {
|
||||
let mut tokens = tokens.into_iter().peekable();
|
||||
let mut out = HashMap::new();
|
||||
|
||||
@ -306,7 +306,7 @@ fn parse_object_value(tokens: &mut TokenIter, key: &str) -> Result<Expression, E
|
||||
if first {
|
||||
first = false;
|
||||
if let TokenTree::Group(group) = token {
|
||||
let expr = parse_object2(group.stream())?;
|
||||
let expr = parse_object(group.stream())?;
|
||||
comma_or_end(tokens)?;
|
||||
return Ok(Expression::Object(expr));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user