Skip to content

Commit 63d50ce

Browse files
authored
Rust 2024 edition (#339)
1 parent 74e450f commit 63d50ce

File tree

27 files changed

+129
-104
lines changed

27 files changed

+129
-104
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
features: default
3838
# MSRV
3939
- os: ubuntu-22.04
40-
toolchain: 1.81.0
40+
toolchain: 1.85.0
4141
features: default
4242
steps:
4343
- uses: actions/checkout@v4

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ keywords = [
1515
"transform-encryption",
1616
]
1717
description = "A pure-Rust SDK for accessing IronCore's privacy platform"
18-
edition = "2021"
19-
rust-version = "1.81.0"
18+
edition = "2024"
19+
rust-version = "1.85.0"
2020

2121
[dependencies]
2222
base64 = "0.22"

benches/ironoxide_bench.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
1+
use criterion::{Criterion, black_box, criterion_group, criterion_main};
22
use ironoxide::prelude::*;
33
use lazy_static::*;
44
use tokio::runtime::Runtime;
@@ -17,7 +17,9 @@ lazy_static! {
1717
},
1818
_ => {
1919
// The core code defaults to `prod`, so we have to set this so the API_URL is set correctly.
20-
std::env::set_var("IRONCORE_ENV", "stage");
20+
unsafe {
21+
std::env::set_var("IRONCORE_ENV", "stage");
22+
}
2123
"stage"
2224
},
2325
}

examples/enc-search-sample.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
// Copyright (c) 2020 IronCore Labs, Inc.
3737
// =============================================================================
3838

39-
use anyhow::{anyhow, Result};
39+
use anyhow::{Result, anyhow};
4040
use ironoxide::prelude::*;
4141
use lazy_static::lazy_static;
4242
use mut_static::MutStatic;

flake.lock

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

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
22
profile = "default"
3-
channel = "1.81.0"
3+
channel = "1.85.0"
44
components = ["rust-src", "rust-analyzer"]

src/crypto/aes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{fmt, num::NonZeroU32};
33
use rand::{self, CryptoRng, RngCore};
44
use ring::{aead, aead::BoundKey, digest, error::Unspecified, pbkdf2};
55

6-
use crate::internal::{take_lock, IronOxideErr};
6+
use crate::internal::{IronOxideErr, take_lock};
77
use std::{convert::TryFrom, ops::DerefMut, sync::Mutex};
88

99
//There is no way this can fail. Value is most definitely not less than one.

src/crypto/transform.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::internal::{
2-
document_api::{DocAccessEditErr, UserOrGroup},
32
IronOxideErr, PublicKey, WithKey,
3+
document_api::{DocAccessEditErr, UserOrGroup},
44
};
55
use itertools::{Either, Itertools};
66
use recrypt::{

src/document.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ pub use crate::internal::document_api::{
88
DocumentMetadataResult, DocumentName, UserOrGroup, VisibleGroup, VisibleUser,
99
};
1010
use crate::{
11+
Result,
1112
common::SdkOperation,
1213
group::GroupId,
1314
internal::{add_optional_timeout, document_api},
1415
policy::PolicyGrant,
1516
user::UserId,
16-
Result,
1717
};
1818
use futures::Future;
1919
use itertools::{Either, EitherOrBoth, Itertools};

src/document/advanced.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ pub use crate::internal::document_api::{
66
DocumentDecryptUnmanagedResult, DocumentEncryptUnmanagedResult,
77
};
88
use crate::{
9-
document::{partition_user_or_group, DocumentEncryptOpts},
9+
Result, SdkOperation,
10+
document::{DocumentEncryptOpts, partition_user_or_group},
1011
internal,
1112
internal::add_optional_timeout,
12-
Result, SdkOperation,
1313
};
1414
use futures::Future;
1515
use itertools::EitherOrBoth;

0 commit comments

Comments
 (0)