Skip to content

Commit 73c9fbb

Browse files
committed
Merge pull request #546 from Potpourri/fix-gfx-macros
Fix gfx_macros
2 parents cb0b04d + 26dc435 commit 73c9fbb

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/gfx_macros/lib.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn find_name(cx: &mut ext::base::ExtCtxt, span: codemap::Span,
5050
attributes.iter().fold(None, |name, attribute| {
5151
match attribute.node.value.node {
5252
ast::MetaNameValue(ref attr_name, ref attr_value) => {
53-
match (attr_name.get(), &attr_value.node) {
53+
match (&attr_name[], &attr_value.node) {
5454
("name", &ast::LitStr(ref new_name, _)) => {
5555
attr::mark_used(attribute);
5656
name.map_or(Some(new_name.clone()), |name| {

‎src/gfx_macros/vertex_format.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn find_modifier(cx: &mut ext::base::ExtCtxt, span: codemap::Span,
7171
attributes.iter().fold(None, |modifier, attribute| {
7272
match attribute.node.value.node {
7373
ast::MetaWord(ref word) => {
74-
word.get().parse().ok().and_then(|new_modifier| {
74+
word.parse().ok().and_then(|new_modifier| {
7575
attr::mark_used(attribute);
7676
modifier.map_or(Some(new_modifier), |modifier| {
7777
cx.span_warn(span, &format!(
@@ -179,7 +179,7 @@ fn method_body(cx: &mut ext::base::ExtCtxt, span: codemap::Span,
179179
Some(name) => name,
180180
None => token::get_ident(ident),
181181
};
182-
let ident_str = ident_str.get();
182+
let ident_str = &ident_str[];
183183
let instance_expr = cx.expr_u8(span, 0); // not supposed to be set by the macro
184184
quote_expr!(cx, {
185185
attributes.push($path_root::gfx::Attribute {

0 commit comments

Comments
 (0)