fix(mbuild): scope -> add_scope

This is not only more precisely saying what it does, but also doesn't
clash with scope parameters on resources ;) (happened in dfareporting)
This commit is contained in:
Sebastian Thiel
2015-03-11 13:47:55 +01:00
parent 5b5ad43bfa
commit 538120f7d1

View File

@@ -146,7 +146,7 @@ ${self._setter_fn(resource, method, m, p, part_prop, ThisType, c)}\
/// Usually there is more than one suitable scope to authorize an operation, some of which may
/// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
/// sufficient, a read-write scope will do as well.
pub fn scope<T>(mut self, scope: T) -> ${ThisType}
pub fn add_scope<T>(mut self, scope: T) -> ${ThisType}
where T: Str {
self.${api.properties.scopes}.insert(scope.as_slice().to_string(), ());
self