Skip to content

Commit

Permalink
fix(API): scopes were used illegally
Browse files Browse the repository at this point in the history
Which caused a compile error. This was fixed by assuring the code
uses the same function to determine whether or not scopes are present
per method.

[skip ci]
  • Loading branch information
Byron committed Apr 17, 2015
1 parent 9ea3fea commit d8fdf9d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion gen/genomics1_beta2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2794,7 +2794,6 @@ impl<'a, C, A> StreamingVariantStoreMethods<'a, C, A> {
hub: self.hub,
_request: request.clone(),
_delegate: Default::default(),
_scopes: Default::default(),
_additional_params: Default::default(),
}
}
Expand Down
1 change: 0 additions & 1 deletion gen/mirror1/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,6 @@ impl<'a, C, A> AccountMethods<'a, C, A> {
_account_type: account_type.to_string(),
_account_name: account_name.to_string(),
_delegate: Default::default(),
_scopes: Default::default(),
_additional_params: Default::default(),
}
}
Expand Down
2 changes: 0 additions & 2 deletions gen/oauth2_v2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,6 @@ impl<'a, C, A> MethodMethods<'a, C, A> {
_id_token: Default::default(),
_access_token: Default::default(),
_delegate: Default::default(),
_scopes: Default::default(),
_additional_params: Default::default(),
}
}
Expand All @@ -574,7 +573,6 @@ impl<'a, C, A> MethodMethods<'a, C, A> {
MethodGetCertForOpenIdConnectCall {
hub: self.hub,
_delegate: Default::default(),
_scopes: Default::default(),
_additional_params: Default::default(),
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/mako/api/lib/rbuild.mako
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
rust_copy_value_s, is_required_property, organize_params, REQUEST_VALUE_PROPERTY_NAME,
build_all_params, rb_type_params_s, hub_type_params_s, mb_type_params_s, mb_additional_type_params,
struct_type_bounds_s, METHODS_RESOURCE, SPACES_PER_TAB, prefix_all_but_first_with,
METHODS_BUILDER_MARKER_TRAIT, remove_empty_lines)
METHODS_BUILDER_MARKER_TRAIT, remove_empty_lines, method_default_scope)
%>\
<%namespace name="util" file="../../lib/util.mako"/>\
<%namespace name="lib" file="lib.mako"/>\
Expand Down Expand Up @@ -108,7 +108,7 @@ impl${rb_params} ${ThisType} {
${property(p.name)}: Default::default(),
% endfor
% for prop_key, custom_name in api.properties.iteritems():
% if prop_key == 'scopes' and (not auth or not auth.oauth2):
% if prop_key == 'scopes' and not method_default_scope(m):
<% continue %>\
% endif
${custom_name}: Default::default(),
Expand Down

0 comments on commit d8fdf9d

Please sign in to comment.