Skip to content

Commit

Permalink
Fix: Update code for changes in Rust
Browse files Browse the repository at this point in the history
LitBinary is now LitByteStr
  • Loading branch information
dinfuehr committed Sep 6, 2015
1 parent 2dbed0a commit 8225c4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phf_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extern crate phf_generator;

use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
use syntax::ast::{self, TokenTree, LitStr, LitBinary, LitByte, LitChar, Expr, ExprLit, ExprVec};
use syntax::ast::{self, TokenTree, LitStr, LitByteStr, LitByte, LitChar, Expr, ExprLit, ExprVec};
use syntax::codemap::{Span, Spanned};
use syntax::ext::base::{DummyResult,
ExtCtxt,
Expand Down Expand Up @@ -222,7 +222,7 @@ fn parse_key(cx: &mut ExtCtxt, e: &Expr) -> Option<Key> {
ExprLit(ref lit) => {
match lit.node {
ast::LitStr(ref s, _) => Some(Key::Str(s.clone())),
ast::LitBinary(ref b) => Some(Key::Binary(b.clone())),
ast::LitByteStr(ref b) => Some(Key::Binary(b.clone())),
ast::LitByte(b) => Some(Key::U8(b)),
ast::LitChar(c) => Some(Key::Char(c)),
ast::LitInt(i, ast::SignedIntLit(ast::TyI8, ast::Plus)) => Some(Key::I8(i as i8)),
Expand Down

0 comments on commit 8225c4b

Please sign in to comment.