Skip to content

Commit 6fd097c

Browse files
authored
Move spdx-data (#77)
* Update to 2024 * Exclude upstream * Release 0.10.9 * Move spdx-data to target * Revert * Revert * Format * Update MSRV
1 parent cdabfa6 commit 6fd097c

File tree

12 files changed

+85
-74
lines changed

12 files changed

+85
-74
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-22.04
4141
steps:
4242
- uses: actions/checkout@v4
43-
- uses: dtolnay/rust-toolchain@1.65.0
43+
- uses: dtolnay/rust-toolchain@1.85.0
4444
- run: cargo fetch
4545
- name: cargo check
4646
run: cargo check --all-targets --all-features

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ a user provided callback
170170
- Initial add of spdx crate, based primarily on [`license-exprs`](https://github.com/rust-lang-nursery/license-exprs)
171171

172172
<!-- next-url -->
173-
[Unreleased]: https://github.com/EmbarkStudios/spdx/compare/0.10.8...HEAD
173+
[Unreleased]: https://github.com/EmbarkStudios/spdx/compare/0.10.9...HEAD
174+
[0.10.9]: https://github.com/EmbarkStudios/spdx/compare/0.10.8...0.10.9
174175
[0.10.8]: https://github.com/EmbarkStudios/spdx/compare/0.10.7...0.10.8
175176
[0.10.7]: https://github.com/EmbarkStudios/spdx/compare/0.10.6...0.10.7
176177
[0.10.6]: https://github.com/EmbarkStudios/spdx/compare/0.10.5...0.10.6

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ authors = [
66
"Jake Shadle <[email protected]>",
77
]
88
description = "Helper crate for SPDX expressions"
9-
edition = "2021"
10-
rust-version = "1.65.0"
9+
edition = "2024"
10+
rust-version = "1.85.0"
1111
homepage = "https://github.com/EmbarkStudios/spdx"
1212
documentation = "https://docs.rs/spdx"
1313
readme = "README.md"
@@ -29,11 +29,11 @@ text = []
2929

3030
[dependencies]
3131
# In most cases expressions are quite small so we can avoid heap allocations
32-
smallvec = "1.7"
32+
smallvec = "1.15"
3333

3434
[dev-dependencies]
3535
# Used to print colored diffs in case of test failures
36-
similar-asserts = "1.1"
36+
similar-asserts = "1.7"
3737

3838
[package.metadata.docs.rs]
3939
all-features = true

src/expression.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mod minimize;
22
mod parser;
33

4-
use crate::{error::ParseError, LicenseReq};
4+
use crate::{LicenseReq, error::ParseError};
55
pub use minimize::MinimizeError;
66
use smallvec::SmallVec;
77
use std::fmt;

src/expression/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::{
2+
LicenseItem, LicenseReq, ParseMode,
23
error::{ParseError, Reason},
34
expression::{ExprNode, Expression, ExpressionReq, Operator},
45
lexer::{Lexer, Token},
5-
LicenseItem, LicenseReq, ParseMode,
66
};
77
use smallvec::SmallVec;
88

src/lexer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
2-
error::{ParseError, Reason},
32
ExceptionId, LicenseId,
3+
error::{ParseError, Reason},
44
};
55

66
/// Parsing configuration for SPDX expression

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ pub fn license_version() -> &'static str {
467467
mod test {
468468
use super::LicenseItem;
469469

470-
use crate::{license_id, Expression};
470+
use crate::{Expression, license_id};
471471

472472
#[test]
473473
fn gnu_or_later_display() {

src/licensee.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::{
2+
ExceptionId, LicenseItem, LicenseReq,
23
error::{ParseError, Reason},
34
lexer::{Lexer, Token},
4-
ExceptionId, LicenseItem, LicenseReq,
55
};
66
use std::fmt;
77

@@ -139,7 +139,7 @@ impl Licensee {
139139
original: original.to_owned(),
140140
span: lt.span,
141141
reason: Reason::Unexpected(&["<license>"]),
142-
})
142+
});
143143
}
144144
}
145145
};
@@ -163,7 +163,7 @@ impl Licensee {
163163
original: original.to_owned(),
164164
span: lt.span,
165165
reason: Reason::Unexpected(&["<exception>"]),
166-
})
166+
});
167167
}
168168
}
169169
}
@@ -172,7 +172,7 @@ impl Licensee {
172172
original: original.to_owned(),
173173
span: lt.span,
174174
reason: Reason::Unexpected(&["WITH"]),
175-
})
175+
});
176176
}
177177
}
178178
}
@@ -288,7 +288,7 @@ impl AsRef<LicenseReq> for Licensee {
288288

289289
#[cfg(test)]
290290
mod test {
291-
use crate::{exception_id, license_id, LicenseItem, LicenseReq, Licensee};
291+
use crate::{LicenseItem, LicenseReq, Licensee, exception_id, license_id};
292292

293293
const LICENSEES: &[&str] = &[
294294
"LicenseRef-Embark-Proprietary",

tests/spdx_list.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ fn handles_deprecated_fsf_and_osi() {
5454

5555
#[test]
5656
fn handles_exception_deprecation() {
57-
assert!(exception_id("Nokia-Qt-exception-1.1")
58-
.unwrap()
59-
.is_deprecated());
57+
assert!(
58+
exception_id("Nokia-Qt-exception-1.1")
59+
.unwrap()
60+
.is_deprecated()
61+
);
6062
}
6163

6264
#[test]

0 commit comments

Comments
 (0)