Skip to content

Commit 115a9ee

Browse files
rokobGREsau
authored andcommitted
Add license notice to regex_syntax.rs
The comment in the code says this code was copied from another source with an appropriate link. However just local to this file it is not clear what the license terms of that code are. I added the license notice to this file that governs the particular code that was copied over. I would like to use this crate in an environment where we want to be clear about licensing. Hopefully this is an okay change otherwise I would be more than happy to do this a different way as long as the license provenance is clear.
1 parent 70f4fb0 commit 115a9ee

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

schemars_derive/src/regex_syntax.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
// Copied from regex_syntax crate to avoid pulling in the whole crate just for a utility function
22
// https://github.com/rust-lang/regex/blob/ff283badce21dcebd581909d38b81f2c8c9bfb54/regex-syntax/src/lib.rs
3+
//
4+
// Copyright (c) 2014 The Rust Project Developers
5+
//
6+
// Permission is hereby granted, free of charge, to any
7+
// person obtaining a copy of this software and associated
8+
// documentation files (the "Software"), to deal in the
9+
// Software without restriction, including without
10+
// limitation the rights to use, copy, modify, merge,
11+
// publish, distribute, sublicense, and/or sell copies of
12+
// the Software, and to permit persons to whom the Software
13+
// is furnished to do so, subject to the following
14+
// conditions:
15+
//
16+
// The above copyright notice and this permission notice
17+
// shall be included in all copies or substantial portions
18+
// of the Software.
19+
//
20+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
21+
// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
22+
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
24+
// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25+
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27+
// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28+
// DEALINGS IN THE SOFTWARE.
329

430
pub fn escape(text: &str) -> String {
531
let mut quoted = String::new();

0 commit comments

Comments
 (0)