Skip to content

Commit 695a56a

Browse files
committed
More prominent license headers
This commit makes the license headers more prominent for types from, or modified from, other libraries
1 parent f51f513 commit 695a56a

File tree

2 files changed

+35
-6
lines changed

2 files changed

+35
-6
lines changed

api_generator/src/api_generator/code_gen/url/enum_builder.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
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+
*/
17+
318

419
use crate::api_generator::code_gen::url::url_builder::{IntoExpr, UrlBuilder};
520
use crate::api_generator::{code_gen::*, ApiEndpoint, Path};

api_generator/src/api_generator/code_gen/url/url_builder.rs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
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+
*/
317

418
use crate::api_generator::code_gen::*;
519
use crate::api_generator::{Path, Type, TypeKind};
@@ -138,7 +152,7 @@ impl<'a> UrlBuilder<'a> {
138152
}
139153
}
140154

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.
142156
fn build_owned(self) -> syn::Block {
143157
let lit_len_expr = Self::literal_length_expr(&self.path);
144158

@@ -164,7 +178,7 @@ impl<'a> UrlBuilder<'a> {
164178
syn::Block { stmts }
165179
}
166180

167-
/// Build a literal path
181+
/// Build the AST for a literal path
168182
fn build_borrowed_literal(self) -> syn::Expr {
169183
let path: Vec<&'a str> = self
170184
.path

0 commit comments

Comments
 (0)