Skip to content

Commit 750f1d9

Browse files
authored
Merge pull request #424 from Superhepper/lint-problems
Fixes problem with lint warnings in different versions of Rust.
2 parents 2b643f1 + 8d47806 commit 750f1d9

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

tss-esapi-sys/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ links = "tss2-esys"
1616
bindgen = { version = "0.63.0", optional = true }
1717
pkg-config = "0.3.18"
1818
target-lexicon = "0.12.0"
19+
rustversion = "1.0.14"
1920

2021
[features]
2122
generate-bindings = ["bindgen"]

tss-esapi-sys/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn main() {
5858
}
5959

6060
#[cfg(feature = "generate-bindings")]
61-
#[allow(clippy::uninlined_format_args)]
61+
#[rustversion::attr(since(1.66), allow(clippy::uninlined_format_args))]
6262
pub fn generate_from_system(esapi_out: PathBuf) {
6363
pkg_config::Config::new()
6464
.atleast_version(MINIMUM_VERSION)

tss-esapi/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ picky-asn1-x509 = { version = "0.6.1", optional = true }
3232
cfg-if = "1.0.0"
3333
strum = { version = "0.25.0", optional = true }
3434
strum_macros = { version = "0.25.0", optional = true }
35+
rustversion = "1.0.14"
3536

3637
[dev-dependencies]
3738
env_logger = "0.9.0"
3839
sha2 = "0.10.1"
3940

4041
[build-dependencies]
4142
semver = "1.0.7"
43+
rustversion = "1.0.14"
4244

4345
[features]
4446
default = ["abstraction"]

tss-esapi/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33
use semver::{Version, VersionReq};
44

5-
#[allow(clippy::uninlined_format_args)]
5+
#[rustversion::attr(since(1.66), allow(clippy::uninlined_format_args))]
66
fn main() {
77
let tss_version_string = std::env::var("DEP_TSS2_ESYS_VERSION")
88
.expect("Failed to parse ENV variable DEP_TSS2_ESYS_VERSION as string");

tss-esapi/src/tcti_ldr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl TctiNameConf {
165165
}
166166
}
167167

168-
#[allow(clippy::uninlined_format_args)]
168+
#[rustversion::attr(since(1.66), allow(clippy::uninlined_format_args))]
169169
impl TryFrom<TctiNameConf> for CString {
170170
type Error = Error;
171171

0 commit comments

Comments
 (0)