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:
Wolfgang Bumiller 2019-06-26 13:48:31 +02:00
parent 916f9d945f
commit 8a2d7a43e0
2 changed files with 3 additions and 3 deletions

View File

@ -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!

View File

@ -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));
}