1
- // Parts modified from https://github.com/elastic-rs/elastic
2
- // Licensed under Apache 2.0: https://github.com/elastic-rs/elastic/blob/51298dd64278f34d2db911bd1a35eb757c336198/LICENSE-APACHE
1
+ /* Some types from or based on types from elastic: https://github.com/elastic-rs/elastic
2
+ *
3
+ * Licensed under Apache 2.0: https://github.com/elastic-rs/elastic/blob/51298dd64278f34d2db911bd1a35eb757c336198/LICENSE-APACHE
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
3
17
4
18
use crate :: api_generator:: code_gen:: * ;
5
19
use crate :: api_generator:: { Path , Type , TypeKind } ;
@@ -138,7 +152,7 @@ impl<'a> UrlBuilder<'a> {
138
152
}
139
153
}
140
154
141
- /// Build an allocated url from the path literals and params.
155
+ /// Build the AST for an allocated url from the path literals and params.
142
156
fn build_owned ( self ) -> syn:: Block {
143
157
let lit_len_expr = Self :: literal_length_expr ( & self . path ) ;
144
158
@@ -164,7 +178,7 @@ impl<'a> UrlBuilder<'a> {
164
178
syn:: Block { stmts }
165
179
}
166
180
167
- /// Build a literal path
181
+ /// Build the AST for a literal path
168
182
fn build_borrowed_literal ( self ) -> syn:: Expr {
169
183
let path: Vec < & ' a str > = self
170
184
. path
0 commit comments