summaryrefslogtreecommitdiff
path: root/src/ast/path.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-06-09 10:58:34 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-06-09 10:58:34 +0800
commit374a42466ee4e9d0a25ef65f73b84e3c870d6f79 (patch)
tree7c9e1575cdbf8b011d56f65f16a8dcc2431bc66f /src/ast/path.cpp
parent9f8d9fa81be1c11b50bc5ced608a3bd18a53de21 (diff)
downloadmrust-374a42466ee4e9d0a25ef65f73b84e3c870d6f79.tar.gz
Fix use of hard tabs
Diffstat (limited to 'src/ast/path.cpp')
-rw-r--r--src/ast/path.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ast/path.cpp b/src/ast/path.cpp
index 9976cae5..37428b1a 100644
--- a/src/ast/path.cpp
+++ b/src/ast/path.cpp
@@ -190,17 +190,17 @@ void Path::bind_variable(unsigned int slot)
}
void Path::bind_enum_var(const Enum& ent, const ::std::string& name, const ::std::vector<TypeRef>& /*args*/)
{
- auto it = ::std::find_if(ent.variants().begin(), ent.variants().end(), [&](const auto& x) { return x.m_name == name; });
- if( it == ent.variants().end() )
- {
- throw ParseError::Generic("Enum variant not found");
- }
- unsigned int idx = it - ent.variants().begin();
+ auto it = ::std::find_if(ent.variants().begin(), ent.variants().end(), [&](const auto& x) { return x.m_name == name; });
+ if( it == ent.variants().end() )
+ {
+ throw ParseError::Generic("Enum variant not found");
+ }
+ unsigned int idx = it - ent.variants().begin();
DEBUG("Bound to enum variant '" << name << "' (#" << idx << ")");
- ::AST::PathBinding::Data_EnumVar tmp = {};
- tmp.enum_ = &ent;
- tmp.idx = idx;
+ ::AST::PathBinding::Data_EnumVar tmp = {};
+ tmp.enum_ = &ent;
+ tmp.idx = idx;
m_binding = PathBinding::make_EnumVar( mv$(tmp) );
}